diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-20 23:49:31 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-20 23:49:31 +0000 |
commit | f3dac884d3c7835a74762238f820f88b332d95c6 (patch) | |
tree | fdd4d99a31b59f1bd4f08b5ec7d0b7537339a1c8 /test/ruby/test_rubyoptions.rb | |
parent | feb39eac80be5664a15474642245c01005b874e6 (diff) | |
download | ruby-f3dac884d3c7835a74762238f820f88b332d95c6.tar.gz |
* compile.c (iseq_compile_each): add debug information to NODE_STR
strings as default.
[Feature #11725]
* insns.def (freezestring): add new instruction to support adding
debug information for dynamically constracted strings.
* compile.c (iseq_compile_each): support adding debug information
for NODE_DSTR with freezestring instruction.
* error.c (rb_error_frozen): change the debug information ID name
id_debug_created_info and this field should have a 2 element array
containing path and line information.
* defs/id.def: ditto.
* test/ruby/test_rubyoptions.rb: catch up this fix.
* test/ruby/test_iseq.rb: now frozen strings are not same.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_rubyoptions.rb')
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 7da34bd5f6..3d77d072b2 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -807,12 +807,14 @@ class TestRubyOptions < Test::Unit::TestCase def test_frozen_string_literal_debug assert_in_out_err(["--disable=gems", "--enable-frozen-string-literal", "--enable-frozen-string-literal-debug" ], '"foo" << "bar"', [], /created at/) - assert_in_out_err(["--disable=gems", "--enable-frozen-string-literal", "--disable-frozen-string-literal-debug"], '"foo" << "bar"', [], /can\'t modify frozen String \(RuntimeError\)\n\z/) + assert_in_out_err(["--disable=gems", "--enable-frozen-string-literal", "--disable-frozen-string-literal-debug"], '"foo" << "bar"', [], /created at/) + assert_in_out_err(["--disable=gems", "--enable-frozen-string-literal", "--enable-frozen-string-literal-debug" ], '"foo#{123}bar" << "bar"', [], /created at/) + assert_in_out_err(["--disable=gems", "--enable-frozen-string-literal", "--disable-frozen-string-literal-debug"], '"foo#{123}bar" << "bar"', [], /can\'t modify frozen String \(RuntimeError\)\n\z/) assert_in_out_err(["--disable=gems", "--disable-frozen-string-literal", "--enable-frozen-string-literal-debug" ], '"foo" << "bar"', [], []) assert_in_out_err(["--disable=gems", "--disable-frozen-string-literal", "--disable-frozen-string-literal-debug"], '"foo" << "bar"', [], []) assert_in_out_err(["--disable=gems", "--enable-frozen-string-literal-debug" ], '"foo" << "bar"', [], []) assert_in_out_err(["--disable=gems", "--disable-frozen-string-literal-debug"], '"foo" << "bar"', [], []) - assert_in_out_err(["--disable=gems", "--enable-frozen-string-literal", ], '"foo" << "bar"', [], /can\'t modify frozen String \(RuntimeError\)\n\z/) - assert_in_out_err(["--disable=gems", "--enable-frozen-string-literal", ], '"foo" << "bar"', [], /can\'t modify frozen String \(RuntimeError\)\n\z/) + assert_in_out_err(["--disable=gems", "--enable-frozen-string-literal", ], '"foo" << "bar"', [], /created at/) + assert_in_out_err(["--disable=gems", "--enable-frozen-string-literal", ], '"foo#{123}bar" << "bar"', [], /can\'t modify frozen String \(RuntimeError\)\n\z/) end end |