Skip to content

Commit 903c87f

Browse files
Adam BeynonAdam Beynon
Adam Beynon
authored and
Adam Beynon
committedNov 17, 2013
Fix word/aword string parsing on ruby 1.8.7
1 parent 57f2a4f commit 903c87f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

Diff for: ‎lib/opal/parser/lexer.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ def yylex
706706
return :tPIPE, '|'
707707

708708
elsif scan(/\%[QqWwxr]/)
709-
str_type = scanner.matched[1]
709+
str_type = scanner.matched[1, 1]
710710
paren = scan(/./)
711711

712712
term = case paren
@@ -728,7 +728,7 @@ def yylex
728728
scan(/\s*/)
729729
return :tWORDS_BEG, scanner.matched
730730
when 'w', 'i'
731-
self.strterm = new_strterm(:sword, 'W', term)
731+
self.strterm = new_strterm(:sword, 'w', term)
732732
scan(/\s*/)
733733
return :tAWORDS_BEG, scanner.matched
734734
when 'x'

0 commit comments

Comments
 (0)
Please sign in to comment.