Skip to content
  • Yusuke Endoh's avatar
    156fb72d
    vm_args.c (rb_warn_check): Use iseq_unique_id instead of its pointer · 156fb72d
    Yusuke Endoh authored
    (This is the second try of 036bc1da.)
    
    If iseq is GC'ed, the pointer of iseq may be reused, which may hide a
    deprecation warning of keyword argument change.
    
    http://ci.rvm.jp/results/trunk-test1@phosphorus-docker/2474221
    
    ```
    1) Failure:
    TestKeywordArguments#test_explicit_super_kwsplat [/tmp/ruby/v2/src/trunk-test1/test/ruby/test_keyword.rb:549]:
    --- expected
    +++ actual
    @@ -1 +1 @@
    -/The keyword argument is passed as the last hash parameter.* for `m'/m
    +""
    ```
    
    This change ad-hocly adds iseq_unique_id for each iseq, and use it
    instead of iseq pointer.  This covers the case where caller is GC'ed.
    Still, the case where callee is GC'ed, is not covered.
    
    But anyway, it is very rare that iseq is GC'ed.  Even when it occurs, it
    just hides some warnings.  It's no big deal.
    156fb72d
    vm_args.c (rb_warn_check): Use iseq_unique_id instead of its pointer
    Yusuke Endoh authored
    (This is the second try of 036bc1da.)
    
    If iseq is GC'ed, the pointer of iseq may be reused, which may hide a
    deprecation warning of keyword argument change.
    
    http://ci.rvm.jp/results/trunk-test1@phosphorus-docker/2474221
    
    ```
    1) Failure:
    TestKeywordArguments#test_explicit_super_kwsplat [/tmp/ruby/v2/src/trunk-test1/test/ruby/test_keyword.rb:549]:
    --- expected
    +++ actual
    @@ -1 +1 @@
    -/The keyword argument is passed as the last hash parameter.* for `m'/m
    +""
    ```
    
    This change ad-hocly adds iseq_unique_id for each iseq, and use it
    instead of iseq pointer.  This covers the case where caller is GC'ed.
    Still, the case where callee is GC'ed, is not covered.
    
    But anyway, it is very rare that iseq is GC'ed.  Even when it occurs, it
    just hides some warnings.  It's no big deal.
Loading