You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module Wrapper
def wrap(meth)
define_method(meth) do |*args, **kwargs, &block|
super(*args, **kwargs, &block)
puts "side effect"
self
end
end
end
class MyString < String
extend Wrapper
wrap :<<
end
MyString.new << "a"
This code prints 'side effect' in cruby but with mruby I get
test.rb:4:in <<: no superclass method 'wrap' (NoMethodError)
What's going on here? This is with latest mruby head.
Activity
matz commentedon Nov 7, 2023
It is a bug. But it may take time to fix the issue. Stay tuned, please.
jabamaus commentedon Nov 7, 2023
No problem. I think the problem got introduced in the past few months as I'm sure I've seen this working.
class.c: keep alias flag in proc object; fix mruby#6098