mame (Yusuke Endoh) wrote in #note-1: > Currently, `a, b = c, d = 3, 4` is interpreted as `a, b = c, (d = 3, 4)`. Whether it is good or not. Ah - that's a good point. So it can be fixed with: `a, b = (c, d = 3, 4)` I didn't see t...daveola (David Stellar)
I may have terminology wrong, so apologies. For this bug I'm going to use "multiple assignment" to refer to using multiple assignment operators in a line, such as: ``` ruby a = b = c = 1 ``` And then parallel assignment to refer...daveola (David Stellar)
I am using module_eval and noticing that since ruby 3.2 the Kernel locations do not have absolute_path for any of the eval code, though the path is available. This is a regression since at least ruby 3.0 which still works. I am on ...daveola (David Stellar)
alanwu (Alan Wu) wrote in #note-15: > I spoke too soon! Flipping the `if` in `demo.rb`: > ... Doesn't the change in https://bugs.ruby-lang.org/issues/18487 (raising a kernel error) imply that this doesn't need to be fixed? Also, tha...daveola (David Stellar)
Eregon (Benoit Daloze) wrote in #note-10: > I'm reluctant to reply since you seem to ignore my comments as a Ruby implementer. I'm sorry you feel that way, and I regret posting to the truffleruby discussion by mistake, I lost track o...daveola (David Stellar)
> You have just made this literally impossible to write in ruby. And before you say "just have the caller pass in the binding" - keep in mind that Kernel::eval does not require this. So you would not, for example, be able to make c...daveola (David Stellar)
Eregon (Benoit Daloze) wrote in #note-6: > OK, finally the issue is clear. > ... This is 100% not what I was hoping for. 1) That seems like it will break a number of things, if your binding is no longer correct. What if you try to ...daveola (David Stellar)
Eregon (Benoit Daloze) wrote in #note-3: > It's the same as TOPLEVEL_BINDING, isn't it? > ... No, it's not. It's the same as the caller's binding, *except* that the receiver/self is set to TOPLEVEL. In other words: ## RUBY CODE ``` c...daveola (David Stellar)
That's actually not really true, there *is* a caller binding, as evidenced by the fact that you can *get* the binding inside of the eval. So it sets up the binding() properly, *except* that binding().receiver is *incorrect* and it eff...daveola (David Stellar)
% ruby -v ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux] (Though looking at the source code this problem still exists in ruby 3.0) The rb_eval_string() is seemingly capable of everything that eval is capable of, ...daveola (David Stellar)