summaryrefslogtreecommitdiff
path: root/lib/irb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-04 17:51:11 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-04 17:51:11 +0000
commit415283ac95e1dd93518836dbaad4545cca4dfa57 (patch)
tree585ea22726278cfc32e1b108583e578732c07853 /lib/irb
parent28af5f6cf58158ea366cf31177db7b4ced43a714 (diff)
* marshal.c (w_object): instance variable dump do not cause error
for objects that cannot be dumped, if they traversed from marshal_dump. they are just ignored. * gc.c (Init_stack): cast "space" (doble value) into unsigned int. should run on PowerPC. * eval.c (rb_eval): should not execute else part if any exception is caught. [ruby-dev:21482] * parse.y (f_args): should allow unparenthesized block argument. * parse.y (f_rest_arg): should allow unparenthesized rest argument. * lib/irb/ruby-lex.rb (RubyLex::identify_identifier): support 'class ::Foo' syntax. [ruby-talk:83514] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb')
-rw-r--r--lib/irb/ruby-lex.rb3
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*(([+-\/*&\|^]|<<|>>|\|\||\&\&)?=|\&\&|\|\|)/)