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

Crash in instance_eval and instance_exec #3432

clayton-shopify opened this issue Feb 6, 2017 · 1 comment

Crash in instance_eval and instance_exec #3432

clayton-shopify opened this issue Feb 6, 2017 · 1 comment


Copy link

clayton-shopify commented Feb 6, 2017

The following input demonstrates a crash:

instance_eval { super &0 }

This issue was reported by

I noticed that the following also crashes:

instance_exec { super &0 }

And the following don't behave as expected. In MRI they result in "super called outside of method" but in MRuby the results are different:

$ bin/mirb
mirb - Embeddable Interactive Ruby Shell

> instance_eval { super 0 }
(mirb):1: expected String (TypeError)
> instance_exec { super 0 }
(mirb):2: no block given (ArgumentError)
Copy link

matz commented Feb 8, 2017

Will be fixed. instance_eval can take a string argument where instance_exec cannot. That's the reason they raise different exceptions.

@matz matz closed this as completed in af4d74f Feb 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

2 participants