[#68478] Looking for MRI projects for Ruby Google Summer of Code 2015 — Tony Arcieri <bascule@...>
Hi ruby-core,
10 messages
2015/03/10
[#68480] Re: Looking for MRI projects for Ruby Google Summer of Code 2015
— SASADA Koichi <ko1@...>
2015/03/10
I have.
[#68549] Re: Looking for MRI projects for Ruby Google Summer of Code 2015
— SASADA Koichi <ko1@...>
2015/03/17
I sent several ideas on previous, mail, but they are seems rejected?
[#68493] [Ruby trunk - Feature #10532] [PATCH] accept_nonblock supports "exception: false" — nobu@...
Issue #10532 has been updated by Nobuyoshi Nakada.
5 messages
2015/03/11
[#68503] Re: [Ruby trunk - Feature #10532] [PATCH] accept_nonblock supports "exception: false"
— Eric Wong <normalperson@...>
2015/03/12
Committed as r49948.
[#68504] Re: [Ruby trunk - Feature #10532] [PATCH] accept_nonblock supports "exception: false"
— Nobuyoshi Nakada <nobu@...>
2015/03/12
On 2015/03/12 12:08, Eric Wong wrote:
[#68506] Seven stacks (and two questions) — Jakub Trzebiatowski <jaktrze1@...>
The Ruby Hacking Guide says that Ruby has窶ヲ seven stacks. Is it an implementation choice (and it could be implemented with one stack), or is there really a need for seven logical stacks? For example, Lua has one stack, and still closures with upvalues are totally possible (it窶冱 like Ruby窶冱 blocks that can reference local variables of their enclosing method, but it works for any function with any upvalues).
5 messages
2015/03/12
[#68520] Possible regression in 2.1 and 2.2 in binding when combined with delegate? — Joe Swatosh <joe.swatosh@...>
# The following code
3 messages
2015/03/14
[#68604] GSOC project Cross-thread Fiber support — surya pratap singh raghuvanshi <oshosurya@...>
- *hi i am a third year computer science student interested in working
6 messages
2015/03/22
[#68606] Re: GSOC project Cross-thread Fiber support
— Tony Arcieri <bascule@...>
2015/03/22
Hi Surya,
[#68619] Re: GSOC project Cross-thread Fiber support
— surya pratap singh raghuvanshi <oshosurya@...>
2015/03/23
hi tony,
[ruby-core:68515] [Ruby trunk - Bug #10969] [Open] public_send in combination with method_missing raises NameError instead of NoMethodError
From:
yves.senn@...
Date:
2015-03-13 08:18:47 UTC
List:
ruby-core #68515
Issue #10969 has been reported by Yves Senn.
----------------------------------------
Bug #10969: public_send in combination with method_missing raises NameError instead of NoMethodError
https://bugs.ruby-lang.org/issues/10969
* Author: Yves Senn
* Status: Open
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14]
* Backport:
----------------------------------------
While working on the Rails project, specifically this issue https://github.com/rails/rails/issues/19297 I discovered that `public_send` can raise a `NameError` instead of a `NoMethodError`.
Following is a minimal reproduction scenario to trigger the bug. A more detailed example can be found in this Gist: https://gist.github.com/senny/9864a138defa322ed807
~~~
class Person
def implicit_assignment
nope rescue nil
public_send "nope="
end
def method_missing(*args)
super
end
end
a = Person.new
a.implicit_assignment
# test.rb:13:in `method_missing': undefined local variable or method `nope=' for #<Person:0x007f91d1052ef8> (NameError)
# from test.rb:4:in `public_send'
# from test.rb:4:in `implicit_assignment'
# from test.rb:24:in `<main>'
~~~
### What a found out during debugging:
I am not a C programmer and have very little experience in that field. While debugging the issue I could make some observations what's going on.
The error is being raised in `raise_method_missing` (https://github.com/ruby/ruby/blob/7790f37efdd8dd42a0a43c3206f6afdd43f8e86a/vm_eval.c#L704-L706):
~~~
else if (last_call_status & NOEX_VCALL) {
format = "undefined local variable or method `%s' for %s";
exc = rb_eNameError;
~~~
`last_call_status` is stored on the current thread (https://github.com/ruby/ruby/blob/7790f37efdd8dd42a0a43c3206f6afdd43f8e86a/vm_eval.c#L655):
The thread struct is modified in `vm_call_method_missing` (https://github.com/ruby/ruby/blob/7790f37efdd8dd42a0a43c3206f6afdd43f8e86a/vm_insnhelper.c#L1668):
~~~
th->method_missing_reason = ci->aux.missing_reason;
~~~
Now the problem is, that the call to `public_send` with the method name containing an `=` sign, does not modify the thread struct. This means that it still contains the value assigned from the previous call. That's what `nope rescue nil` in the reproduction is used for. It assigns `NOEX_VCALL` to that struct.
--
https://bugs.ruby-lang.org/