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

[Truffle] Add NoMethodError layout with args #4027

Merged
merged 2 commits into from
Jul 24, 2016

Conversation

bjfish
Copy link
Contributor

@bjfish bjfish commented Jul 23, 2016

No description provided.

@bjfish bjfish added the truffle label Jul 23, 2016
@eregon
Copy link
Member

eregon commented Jul 23, 2016

Looks good! 👍

@@ -189,12 +189,11 @@ def initialize(*args)
end

class NoMethodError < NameError
attr_reader :args

def initialize(*arguments)
super(arguments.shift)
@name = arguments.shift
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to work?
Maybe at this point it would make sense to move initialize of exceptions in Java.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eregon I don't think this initialize method works as is. I will update this method.

@args = arguments.shift
args = arguments.size > 2 ? arguments.pop : nil
super(*arguments) # TODO BJF Jul 24, 2016 Need to handle NoMethodError.new(1,2,3,4)
Truffle.invoke_primitive :no_method_error_set_args, self, args
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eregon I've updated these to match more closely the expected behavior. There is still an edge case here that isn't handled yet mentioned in the TODO. It looks like there will be a new field in 2.4 and this edge case behavior is also better documented there.

@eregon eregon merged commit 460a2c4 into master Jul 24, 2016
@eregon eregon deleted the truffle-no-method-error-layout-with-args branch July 24, 2016 12:02
@enebo enebo modified the milestone: truffle-dev Aug 26, 2016
@enebo enebo added this to the Invalid or Duplicate milestone Dec 7, 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

Successfully merging this pull request may close these issues.

None yet

3 participants