diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-02 16:45:35 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-02 16:45:35 +0000 |
| commit | 8e011248465bae7b06203bc2c260432454bcac21 (patch) | |
| tree | 6ae42a518c1c5705b8f097668d2b83413da0b6ec /lib/racc/parser.rb | |
| parent | 50c355b12eac3ffa982fc60e96a8a272b6b4dff9 (diff) | |
| download | ruby-8e011248465bae7b06203bc2c260432454bcac21.tar.gz ruby-8e011248465bae7b06203bc2c260432454bcac21.tar.xz ruby-8e011248465bae7b06203bc2c260432454bcac21.zip | |
use Object#class instead of deprecated Object#type.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/racc/parser.rb')
| -rw-r--r-- | lib/racc/parser.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index ca581006d..25590fa22 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -72,7 +72,7 @@ module Racc def _racc_setup - t = self.type + t = self.class unless t::Racc_debug_parser then @yydebug = false @@ -115,7 +115,7 @@ module Racc end def next_token - raise NotImplementedError, "#{self.type}\#next_token is not defined" + raise NotImplementedError, "#{self.class}\#next_token is not defined" end def _racc_do_parse_rb( arg, in_debug ) @@ -467,12 +467,12 @@ nerr = 0 # tmp end def racc_token2str( tok ) - type::Racc_token_to_s_table[tok] or + self.class::Racc_token_to_s_table[tok] or raise RuntimeError, "[Racc Bug] can't convert token #{tok} to string" end def token_to_str( t ) - type::Racc_token_to_s_table[t] + self.class::Racc_token_to_s_table[t] end end |
