Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jrubyc compiled representation breaks but source rb works fine #4621

Closed
stergiom opened this issue May 23, 2017 · 1 comment
Closed

jrubyc compiled representation breaks but source rb works fine #4621

stergiom opened this issue May 23, 2017 · 1 comment

Comments

@stergiom
Copy link

Environment

The AOT compiled representation of code utilising the dry-auto_inject gem breaks yet works fine when the source rb is used, - gist illustrating the issue

  • Tested with 9.1.7.0 & 9.1.9.0, the issue is present in both cases

Expected Behavior

Same behavior as with the source rb

Actual Behavior

An ArgumentError is thrown

@flash-gordon
Copy link

The more concise example:

class A
  def initialize(foo: 1)
  end
end

class B < A
  def initialize(*, **)
    super
  end
end

B.new

Fails with

ArgumentError: unknown keyword:

But

class B < A
  def initialize(*)
    super
  end
end

works fine. This means the problem is in using ** along with *, this should make no difference
so it looks like a minor bug.

@stergiom just remove ** from your constructor and you should be fine.

@enebo enebo added this to the JRuby 9.1.13.0 milestone Aug 18, 2017
enebo added a commit that referenced this issue Aug 18, 2017
…s fine.

yay for object identity instead of a nice equals...
@enebo enebo closed this as completed in 7118975 Aug 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants