Skip to content

Commit f190425

Browse files
committed
Remove Scanner dependency on Tokens::Keyword
1 parent 2544ee4 commit f190425

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scanner.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ def unget(c)
9191
def expect(str,&block)
9292
return buf if str == ""
9393
return str.expect(self,&block) if str.respond_to?(:expect)
94-
return Tokens::Keyword.expect(self, str) if str.is_a?(Symbol)
94+
95+
str = str.to_s
9596
buf = ScannerString.new
9697
buf.position = self.position
9798
str.each_byte do |s|
@@ -102,6 +103,7 @@ def expect(str,&block)
102103
end
103104
buf << get
104105
end
106+
105107
return buf
106108
end
107109

0 commit comments

Comments
 (0)