diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-03-19 02:35:50 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-03-19 02:35:50 +0000 |
commit | e39f7e64b73f0506def7adc88226d6821608da54 (patch) | |
tree | 430ed3485d2cdf3e9c1e05189667cb8a2e9242e3 /test/ripper | |
parent | ae5d9a7664e9664102b1ebc890afdafdf053bed8 (diff) | |
download | ruby-e39f7e64b73f0506def7adc88226d6821608da54.tar.gz |
parse.y: fix segv with Ripper#yydebug
* parse.y (parser_token_value_print): in ripper, ID values are
wrapped in NODE_RIPPER at set_yylval_name(), so print the Symbol
wrapped together.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ripper')
-rw-r--r-- | test/ripper/test_ripper.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ripper/test_ripper.rb b/test/ripper/test_ripper.rb index e7d20a66a0..13a5294618 100644 --- a/test/ripper/test_ripper.rb +++ b/test/ripper/test_ripper.rb @@ -65,6 +65,15 @@ class TestRipper::Ripper < Test::Unit::TestCase assert_predicate @ripper, :yydebug end + def test_yydebug_ident + out = StringIO.new + ripper = Ripper.new 'test_xxxx' + ripper.yydebug = true + ripper.debug_output = out + ripper.parse + assert_include out.string[/.*"local variable or method".*/], 'test_xxxx' + end + def test_regexp_with_option bug11932 = '[ruby-core:72638] [Bug #11932]' src = '/[\xC0-\xF0]/u'.dup.force_encoding(Encoding::UTF_8) |