summaryrefslogtreecommitdiff
path: root/test/-ext-/iseq_load
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-07 19:50:49 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-07 19:50:49 +0000
commit011347e4d71d9d6a706759b4a43687b87d77a97d (patch)
tree4faf9403cc1b3b85bb4927c0be9300f04c5e0b94 /test/-ext-/iseq_load
parentfe94eaa5aed12408167a67930504093e3fa56c25 (diff)
iseq.c (iseq_data_to_ary): dump kw_arg as symbol
Fix RubyVM::InstructionSequence#to_a after r49517 Keywords were made symbols to fix [Bug #10831] [ruby-core:68031], so we should dump symbols as-is instead of attempting to convert them from IDs * iseq.c (iseq_data_to_ary): dump kw_arg as symbol * test/-ext-/iseq_load/test_iseq_load.rb: test kw_arg roundtrip [ruby-core:69891] [Bug #11338] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/-ext-/iseq_load')
-rw-r--r--test/-ext-/iseq_load/test_iseq_load.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/-ext-/iseq_load/test_iseq_load.rb b/test/-ext-/iseq_load/test_iseq_load.rb
index 7251603b0a..5dfd69a863 100644
--- a/test/-ext-/iseq_load/test_iseq_load.rb
+++ b/test/-ext-/iseq_load/test_iseq_load.rb
@@ -86,6 +86,15 @@ class TestIseqLoad < Test::Unit::TestCase
assert_iseq_roundtrip(src)
end
+ def test_kwarg
+ assert_iseq_roundtrip <<-'end;'
+ def foo(kwarg: :foo)
+ kwarg
+ end
+ foo(kwarg: :bar)
+ end;
+ end
+
# FIXME: still failing
def test_require_integration
skip "iseq loader require integration tests still failing"