[#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:68419] [Ruby trunk - Bug #10818] Extrange behaviour when apliying a refinement inside eval
From:
shugo@...
Date:
2015-03-05 02:52:54 UTC
List:
ruby-core #68419
Issue #10818 has been updated by Shugo Maeda.
Assignee changed from Yukihiro Matsumoto to Shugo Maeda
Shugo Maeda wrote:
> I'd like to hear Matz's opinion.
I talked with Matz, and he said that a binding should keep refinements activation
information and the refinements should be activated in subsequent eval calls with
the binding.
So I'll change the behavior of eval as follows:
```ruby
module M
refine String do
def foobar; puts 'foobar'; end
end
end
some_binding = class A; binding; end
str1 = <<EOF
using M
'str'.foobar
EOF
str2 = <<EOF
'str'.foobar
EOF
eval str1, some_binding # foobar
eval str2, some_binding # foobar (No exception is raised)
```
----------------------------------------
Bug #10818: Extrange behaviour when apliying a refinement inside eval
https://bugs.ruby-lang.org/issues/10818#change-51764
* Author: Pablo Herrero
* Status: Assigned
* Priority: Normal
* Assignee: Shugo Maeda
* ruby -v: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
When you activate a refinement inside an a string using `eval` with a binding, the refinement is sill active the next time you call `eval` with the same binding.
Strangely enough, this will only happen if there is an assignment at the code evaluated the first time. If you delete the assignment everything works as expected.
```ruby
module M
refine String do
def foobar; puts 'foobar'; end
end
end
some_binding = class A; binding; end
str1 = <<EOF
a = 'something' # Without this everything works as expected
using M
'str'.foobar # Works fine
EOF
str2 = <<EOF
'str'.foobar # This time should fail but it doesn't
EOF
eval str1, some_binding
eval str2, some_binding
```
Acording to the [RefinmentsSpec](https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/RefinementsSpec): "when main.using is invoked in a string given as the first argument of Kernel#eval, Kernel#instance_eval, or Module#module_eval, the end of the scope is the end of the string."
Which contradicts with this code's behavior.
--
https://bugs.ruby-lang.org/