[#79914] [Ruby trunk Bug#13282] opt_str_freeze does not always dedupe — normalperson@...
Issue #13282 has been reported by Eric Wong.
4 messages
2017/03/05
[#80140] [Ruby trunk Feature#13295] [PATCH] compile.c: apply opt_str_freeze to String#-@ (uminus) — shyouhei@...
Issue #13295 has been updated by shyouhei (Shyouhei Urabe).
5 messages
2017/03/13
[#80362] Re: [Ruby trunk Feature#13295] [PATCH] compile.c: apply opt_str_freeze to String#-@ (uminus)
— Eric Wong <normalperson@...>
2017/03/26
[email protected] wrote:
[#80368] Re: [Ruby trunk Feature#13295] [PATCH] compile.c: apply opt_str_freeze to String#-@ (uminus)
— SASADA Koichi <ko1@...>
2017/03/27
On 2017/03/26 15:16, Eric Wong wrote:
[#80205] Re: [ruby-cvs:65166] duerst:r58000 (trunk): clarifiy 'codepoint' in documentation of String#each_codepoint — Eric Wong <normalperson@...>
[email protected] wrote:
4 messages
2017/03/17
[#80213] Re: [ruby-cvs:65166] duerst:r58000 (trunk): clarifiy 'codepoint' in documentation of String#each_codepoint
— Martin J. Dürst <duerst@...>
2017/03/17
Hello Eric,
[#80290] [Ruby trunk Feature#13355] [PATCH] compile.c: optimize literal String range in case/when dispatch — normalperson@...
Issue #13355 has been reported by normalperson (Eric Wong).
4 messages
2017/03/23
[#80410] Re: [Ruby trunk Feature#13355] [PATCH] compile.c: optimize literal String range in case/when dispatch
— Eric Wong <normalperson@...>
2017/03/27
[email protected] wrote:
[#80415] [Ruby trunk Feature#12589] VM performance improvement proposal — vmakarov@...
Issue #12589 has been updated by vmakarov (Vladimir Makarov).
5 messages
2017/03/28
[#80488] [Ruby trunk Feature#12589] VM performance improvement proposal — vmakarov@...
Issue #12589 has been updated by vmakarov (Vladimir Makarov).
4 messages
2017/03/29
[ruby-core:80411] [Ruby trunk Bug#7097] Thread locals don't work inside Enumerator
From:
samuel@...
Date:
2017-03-27 21:05:27 UTC
List:
ruby-core #80411
Issue #7097 has been updated by ioquatix (Samuel Williams).
I feel like the solution that was reached here is confusing. I feel like the correct outcome would have been
Thread#[] and Thread#[]= are what thread_variable_set and thread_variable_get do.
Fiber#[] and Fiber#[]= are what Thread#[] and Thread#[]= do.
Otherwise, when Fiber is used internally, unexpected behaviour may result. It may even be that certain operations optionally use a Fiber or not, and if that happens, it's even more confusing/unspecified.
Does it make sense to continue this discussion, or are we done, and that's simply how it is?
----------------------------------------
Bug #7097: Thread locals don't work inside Enumerator
https://bugs.ruby-lang.org/issues/7097#change-63905
* Author: tenderlovemaking (Aaron Patterson)
* Status: Closed
* Priority: Normal
* Assignee: ko1 (Koichi Sasada)
* Target version: 2.0.0
* ruby -v: ruby 2.0.0dev (2012-09-25 trunk 37032) [x86_64-darwin12.2.0]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
I set a thread local outside an Enumerator. The Enumerator runs inside the same thread where I set the local. I would expect the thread local to be available since I am in the same thread, but it is not.
Here is a test that shows the problem:
require 'minitest/autorun'
class ThreadLocalBreaks < MiniTest::Unit::TestCase
def test_thread_local_in_enumerator
Thread.current[:foo] = "bar"
thread, value = Enumerator.new { |y|
y << [Thread.current, Thread.current[:foo]]
}.next
assert_equal Thread.current, thread # passes
assert_equal Thread.current[:foo], value # fails
end
end
---Files--------------------------------
thread_locals.patch (2.68 KB)
thread_variables.patch (8.62 KB)
thread_variables.patch (9.43 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>