Skip to content

Commit

Permalink
Fix word/aword string parsing on ruby 1.8.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Beynon authored and Adam Beynon committed Nov 17, 2013
1 parent 57f2a4f commit 903c87f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/opal/parser/lexer.rb
Expand Up @@ -706,7 +706,7 @@ def yylex
return :tPIPE, '|'

elsif scan(/\%[QqWwxr]/)
str_type = scanner.matched[1]
str_type = scanner.matched[1, 1]
paren = scan(/./)

term = case paren
Expand All @@ -728,7 +728,7 @@ def yylex
scan(/\s*/)
return :tWORDS_BEG, scanner.matched
when 'w', 'i'
self.strterm = new_strterm(:sword, 'W', term)
self.strterm = new_strterm(:sword, 'w', term)
scan(/\s*/)
return :tAWORDS_BEG, scanner.matched
when 'x'
Expand Down

0 comments on commit 903c87f

Please sign in to comment.