I've found some unexpected indentations such as following examples. ### Example 1 #### Before ``` ruby foo = "bar" if /^.*(foo)/.match("foo") case foo when /1/ puts "foo" when /2/ puts "bar" end end ``` #### After ``` ruby foo = "bar" if /^.*(foo)/.match("foo") case foo # Not indented. when /1/ puts "foo" when /2/ # Not unindented. puts "bar" # Not indented. end end ``` ### Example 2 #### Before ``` ruby foo = "bar" if /^.*(foo)/.match("foo") case foo when 1 puts "foo" when 2 puts "bar" end end ``` In this case, no indent will be executed. ### Example 3 Meanwhile, it will be indented correctly if the codes are as following. #### Before ``` ruby foo = "bar" if /^.*(foo)bar/.match("foo") # Added a string after parentheses case foo when 1 puts "foo" when 2 puts "bar" end end ``` #### After ``` ruby foo = "bar" if /^.*(foo)bar/.match("foo") case foo when 1 puts "foo" when 2 puts "bar" end end ```
Activity