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
{{ message }}
Repository navigation
caller appears to report wrong line when block passed and brackets omitted #5949
I've recently started working with mruby and am busy porting my codebase from cruby to mruby in such a way that the code executes the same. Its been throwing up a lot of issues (mostly due to occasional missing methods), which I am managing to get past. However, some of my tests are failing due to the following issue. The following code demonstrates the problem. I heavily use the second form (without the function call brackets) so this issue is important to me. I also heavily rely on Kernel#caller. This issue only shows up if a block is passed aswell as not using brackets. Is this a bug? It definitely behaves different to cruby which does what I expect.
Thanks for mruby!
def a(id) = puts caller[0]
a(1) do # caller reports this line
end
a 1 do
end # without brackets caller reports this line
Activity
jabamaus commentedon Mar 9, 2023
I should say I'm using mruby 3.2 on windows.
jabamaus commentedon Mar 11, 2023
Thank you so much Matz. Really appreciate it :)
mruby-compiler: need to adjust the line number for do_block; fix mrub…