Project

General

Profile

Bug #9975 » fix_irb_keyword_bug.patch

takkanm (三村 益隆), 06/24/2014 01:08 PM

View differences:

lib/irb/ruby-lex.rb
824 824
	      when "class"
825 825
		valid = false unless peek_match?(/^\s*(<<|\w|::)/)
826 826
	      when "def"
827
		valid = false if peek_match?(/^\s*(([+\-\/*&\|^]|<<|>>|\|\||\&\&)=|\&\&|\|\|)/)
827
		valid = false if peek_match?(/^\s*(([+\-\/*&\|^]|<<|>>|\|\||\&\&)=|\&\&|\|\||:)/)
828 828
	      when "do"
829
		valid = false if peek_match?(/^\s*([+\-\/*]?=|\*|<|>|\&)/)
829
		valid = false if peek_match?(/^\s*([+\-\/*]?=|\*|<|>|\&|:)/)
830 830
	      when *ENINDENT_CLAUSE
831
		valid = false if peek_match?(/^\s*([+\-\/*]?=|\*|<|>|\&|\|)/)
831
		valid = false if peek_match?(/^\s*([+\-\/*]?=|\*|<|>|\&|\||:)/)
832 832
	      else
833 833
		# no nothing
834 834
	      end