diff options
author | (no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-05-24 07:13:56 +0000 |
---|---|---|
committer | (no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-05-24 07:13:56 +0000 |
commit | 1d2c192d35dcaa0483eebd891fddef0e972c8a59 (patch) | |
tree | c33a3db7cc3c455b958f645083f0f9efbbfb165b /lib/irb/ruby-token.rb | |
parent | 99020d6e50702eb371111d73280eb80b4b29ba5b (diff) |
This commit was manufactured by cvs2svn to create tag
'v1_6_4_preview3'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_6_4_preview3@1446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb/ruby-token.rb')
-rw-r--r-- | lib/irb/ruby-token.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/irb/ruby-token.rb b/lib/irb/ruby-token.rb index 1532dc78eb..2e5715c9f7 100644 --- a/lib/irb/ruby-token.rb +++ b/lib/irb/ruby-token.rb @@ -1,9 +1,9 @@ # -# ruby-token.rb - ruby tokens -# $Release Version: 0.6$ +# irb/ruby-token.rb - ruby tokens +# $Release Version: 0.7.3$ # $Revision$ # $Date$ -# by Keiju ISHITSUKA(Nippon Rational Inc.) +# by Keiju ISHITSUKA(keiju@ishitsuka.com) # # -- # @@ -17,6 +17,11 @@ module RubyToken EXPR_FNAME = :EXPR_FNAME EXPR_DOT = :EXPR_DOT EXPR_CLASS = :EXPR_CLASS + + # for ruby 1.4X + if !defined?(Symbol) + Symbol = Integer + end class Token def initialize(seek, line_no, char_no) @@ -241,7 +246,7 @@ module RubyToken TkSymbol2Token = {} def RubyToken.def_token(token_n, super_token = Token, reading = nil, *opts) - token_n = token_n.id2name unless token_n.kind_of?(String) + token_n = token_n.id2name if token_n.kind_of?(Symbol) if RubyToken.const_defined?(token_n) IRB.fail AlreadyDefinedToken, token_n end |