1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

dsym should be treated as string [ruby-core:91852] [Bug #15670]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ktsj 2019-03-16 04:00:14 +00:00
parent e4c184c6ae
commit 7006fdecf2
2 changed files with 9 additions and 1 deletions

View file

@ -3796,7 +3796,7 @@ sym : fname
| tCVAR | tCVAR
; ;
dsym : tSYMBEG xstring_contents tSTRING_END dsym : tSYMBEG string_contents tSTRING_END
{ {
SET_LEX_STATE(EXPR_END); SET_LEX_STATE(EXPR_END);
/*%%%*/ /*%%%*/

View file

@ -132,4 +132,12 @@ eot
end end
end end
end end
def test_dsym
bug15670 = '[ruby-core:91852]'
_, (_, _, s) = Ripper.sexp_raw(%q{:"sym"})
assert_equal([:dyna_symbol, [:string_add, [:string_content], [:@tstring_content, "sym", [1, 2]]]],
s,
bug15670)
end
end if ripper_test end if ripper_test