diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/irb/ruby-lex.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index 5fbcff90ec..6b445a32b9 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -791,8 +791,7 @@ class RubyLex valid = true case token when "class" - valid = false unless peek_match?(/^\s*(<<|\w)/) - + valid = false unless peek_match?(/^\s*(<<|\w|::)/) when "def" valid = false if peek_match?(/^\s*(([+-\/*&\|^]|<<|>>|\|\||\&\&)=|\&\&|\|\|)/) # valid = false if peek_match?(/^\s*(([+-\/*&\|^]|<<|>>|\|\||\&\&)?=|\&\&|\|\|)/) |