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

Stack frame should be able to handle BasicObject-like bindings #179

Merged
merged 2 commits into from
Aug 2, 2013

Conversation

kostia
Copy link
Contributor

@kostia kostia commented Jun 27, 2013

Fixes #178

@haileys
Copy link
Collaborator

haileys commented Jun 27, 2013

I would prefer it if this was fixed by using ::Kernel.method rather than rescuing from a NameError

On 28/06/2013, at 2:33, Kostiantyn Kahanskyi [email protected] wrote:

Fixes #178

You can merge this Pull Request by running

git pull https://github.com/kostia/better_errors basic_object_fix
Or view, comment on, or merge it at:

#179

Commit Summary

Stack frame should be able to handle BasicObject-like bindings
File Changes

M lib/better_errors/stack_frame.rb (10)
M spec/better_errors/stack_frame_spec.rb (6)
Patch Links:

https://github.com/charliesome/better_errors/pull/179.patch
https://github.com/charliesome/better_errors/pull/179.diff

@kostia
Copy link
Contributor Author

kostia commented Jun 28, 2013

Ok.
What would you expect as @class_name? Because BasicObject can't do such kind of reflexion and in this case delegating to Kernel or whatever would not help.

@haileys
Copy link
Collaborator

haileys commented Jun 28, 2013

@kostia This works in Ruby 2.0:

Kernel.instance_method(:class).bind(BasicObject.new).call

@kostia
Copy link
Contributor Author

kostia commented Jun 28, 2013

@charliesome I know, but it would not work in 1.9.3 and below.

@haileys
Copy link
Collaborator

haileys commented Jun 29, 2013

I'm ok with making 1.9 a second class platform.

I don't want to drop support for 1.9 straight away, but it's ok if there are enhancements only available on 2.0.

On 29/06/2013, at 9:01, Kostiantyn Kahanskyi [email protected] wrote:

@charliesome I know, but it would not work in 1.9.3 and below.


Reply to this email directly or view it on GitHub.

@kostia
Copy link
Contributor Author

kostia commented Jun 29, 2013

@charliesome I've changed it so, that the decoration fully works in Ruby >= 2.0.0 and doesn't blow up in below versions.

haileys pushed a commit that referenced this pull request Aug 2, 2013
Stack frame should be able to handle BasicObject-like bindings
@haileys haileys merged commit 77e0ce3 into BetterErrors:master Aug 2, 2013
@kostia kostia deleted the basic_object_fix branch September 2, 2013 12:13
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.

Errors when inspecting BasicObject
2 participants