Bug #9975 » fix_irb_keyword_bug.patch
lib/irb/ruby-lex.rb | ||
---|---|---|
when "class"
|
||
valid = false unless peek_match?(/^\s*(<<|\w|::)/)
|
||
when "def"
|
||
valid = false if peek_match?(/^\s*(([+\-\/*&\|^]|<<|>>|\|\||\&\&)=|\&\&|\|\|)/)
|
||
valid = false if peek_match?(/^\s*(([+\-\/*&\|^]|<<|>>|\|\||\&\&)=|\&\&|\|\||:)/)
|
||
when "do"
|
||
valid = false if peek_match?(/^\s*([+\-\/*]?=|\*|<|>|\&)/)
|
||
valid = false if peek_match?(/^\s*([+\-\/*]?=|\*|<|>|\&|:)/)
|
||
when *ENINDENT_CLAUSE
|
||
valid = false if peek_match?(/^\s*([+\-\/*]?=|\*|<|>|\&|\|)/)
|
||
valid = false if peek_match?(/^\s*([+\-\/*]?=|\*|<|>|\&|\||:)/)
|
||
else
|
||
# no nothing
|
||
end
|