can't dup Fixnum (TypeError)
In Ruby 2.2 (older versions are good) there is a bug with unnamed keyword arguments when
super is used.
module Foo def foo(**) end end class Bar include Foo def foo(bar: "bar", **) super end end Bar.new.foo # `dup': can't dup Fixnum (TypeError)
It happens when
super is called. If I give the keyword arguments a name (
**options) or if I remove the default keyword argument (
bar: "bar"), the error doesn't happen.
Updated by nobu (Nobuyoshi Nakada) over 5 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Applied in changeset r49041.
parse.y: fix internal IDs conflict
- parse.y (f_kwrest, new_args_tail_gen): unnamed rest keyword and keywords bits arguments should be unique. since internal IDs depend on the local variable index in the current scope, new ID should be made before popping those vtables. [ruby-core:67157] [Bug #10659]