Permalink
Browse files

Lazy hack to run under rubinius.

PositionedToken (and its superclass, Token) violate LSP on initialize,
which trips up rbx's String#downcase.

The #to_s should probably be measurably earlier than this; without
thinking it through a great deal, I think we leak Tokens to places that
should really only be seeing the underlying String.
  • Loading branch information...
1 parent d0fb867 commit 7b5ddfea170c7734dcd4b6577e70a4071c73df2e @matthewd committed Oct 23, 2010
Showing with 3 additions and 0 deletions.
  1. +3 −0 parser.rb
View
@@ -7,6 +7,9 @@ def token tok
end
end
+class Syntax::Token
+ def downcase; to_s.downcase; end
+end
class PositionedToken < Syntax::Token
attr_accessor :position
def initialize data, group, position

0 comments on commit 7b5ddfe

Please sign in to comment.