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

different behavior of instance_eval #3029

Closed
takahashim opened this Issue Nov 20, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@takahashim
Contributor

takahashim commented Nov 20, 2015

In CRuby, I can get the receiver through block argument, but in mruby, I can't.
Is it mruby's limitation?

$ cat tmp.rb
class Foo
  def initialize(&block)
    self.instance_eval(&block)
  end
end

Foo.new{ |arg| p arg }

$ ruby tmp.rb
#<Foo:0x007f97ca038798>
$ ./bin/mruby tmp.rb
nil

@tsahara tsahara referenced this issue Dec 8, 2015

Closed

make December 2015 Stable Release #155

68 of 69 tasks complete

@matz matz closed this in aa1f668 Jan 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment