diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-29 07:29:09 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-29 07:29:09 +0000 |
commit | c07ec8434596749d453365db45edd0479219e86d (patch) | |
tree | 52512ae4984d386f1c4cf20cd0c0ef8f0d0ad2a1 | |
parent | 8ad98918235c6642be5c6b9b81cb5099616a824a (diff) |
merge revision(s) 51190: [Backport #11338]
* 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/branches/ruby_2_2@52783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | iseq.c | 2 | ||||
-rw-r--r-- | test/-ext-/iseq_load/test_iseq_load.rb | 9 | ||||
-rw-r--r-- | version.h | 2 |
4 files changed, 17 insertions, 2 deletions
@@ -1,3 +1,9 @@ +Sun Nov 29 16:11:32 2015 Eric Wong <e@80x24.org> + + * 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] + Sun Nov 29 02:55:56 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com> * gc.c (__has_feature): move into internal.h. @@ -1834,7 +1834,7 @@ iseq_data_to_ary(rb_iseq_t *iseq) orig_argc -= ci->kw_arg->keyword_len; for (i = 0; i < ci->kw_arg->keyword_len; i++) { - rb_ary_push(kw, ID2SYM(ci->kw_arg->keywords[i])); + rb_ary_push(kw, ci->kw_arg->keywords[i]); } rb_hash_aset(e, ID2SYM(rb_intern("kw_arg")), kw); } diff --git a/test/-ext-/iseq_load/test_iseq_load.rb b/test/-ext-/iseq_load/test_iseq_load.rb index 5bbd49efba..e6cb0ff5c4 100644 --- a/test/-ext-/iseq_load/test_iseq_load.rb +++ b/test/-ext-/iseq_load/test_iseq_load.rb @@ -74,6 +74,15 @@ class TestIseqLoad < Test::Unit::TestCase end; 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" @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.2.4" #define RUBY_RELEASE_DATE "2015-11-29" -#define RUBY_PATCHLEVEL 208 +#define RUBY_PATCHLEVEL 209 #define RUBY_RELEASE_YEAR 2015 #define RUBY_RELEASE_MONTH 11 |