General

Profile

dre3k (Andrei Kulakov)

  • Login: dre3k
  • Email: krugliy@gmail.com
  • Registered on: 08/11/2010
  • Last sign in: 03/31/2011

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 7 7

Activity

03/12/2011

08:26 PM Ruby Bug #4480: Thread-local variables issue: Thread#[] returns nil when called first time
=begin
I also wanted to say this is rdoc's example of Thread#[] the one that tricked me.
Right now this is:
a = Thread.new { Thread.current["name"] = "A"; Thread.stop }
b = Thread.new { Thread.current[:name] = "B"; Thread.sto...
dre3k (Andrei Kulakov)
06:48 PM Ruby Bug #4480: Thread-local variables issue: Thread#[] returns nil when called first time
=begin
Hi Robert,
Thanks a lot. You are totally right about Thread#join.
But what the solution in my particular case, how do I get thread-local variable when `Thread.stop` called within a thread.
t = Thread.new do
Threa...
dre3k (Andrei Kulakov)

03/08/2011

02:26 AM Ruby Bug #4480 (Closed): Thread-local variables issue: Thread#[] returns nil when called first time
=begin
In ruby 1.9.2p180
t = Thread.new do
Thread.current[:var] = "var"
Thread.stop
end

p t[:var] #=> nil
p t[:var] #=> "var"
In ruby 1.8.7
p t[:var] #=> "var"
p t[:var] #=> "var"
=end
dre3k (Andrei Kulakov)

01/19/2011

02:42 AM Ruby Bug #4292: Type of rdoc in string.c
=begin
I apologize, I meant typo.
=end
dre3k (Andrei Kulakov)
02:32 AM Ruby Bug #4292 (Closed): Type of rdoc in string.c
=begin
--- string.c (revision 30594)
+++ string.c (working copy)
@@ -2577,7 +2577,7 @@
* against <i>str</i>,and returns the position the match starts, or
*
dre3k (Andrei Kulakov)

01/16/2011

12:27 AM Ruby Bug #4282: Range#map inconsistency with blocks like {...} and do...end
=begin
I got that, but one thing: how exactly should I explicitly put parentheses around my expression?

Doing so:

p ((1..2).map do |i|
i
end)

yields syntax errors:

issue.rb:1: syntax error, unexpected keyword_d...
dre3k (Andrei Kulakov)

01/15/2011

03:16 AM Ruby Bug #4282 (Rejected): Range#map inconsistency with blocks like {...} and do...end
=begin
I'm not sure that it's supposed to be like that:

p (1..2).map{|i|
i
}.class # => Array

p (1..2).map do |i|
i
end.class # => #<Enumerator: 1..2:map>

p (1..2).map d...
dre3k (Andrei Kulakov)

09/01/2010

02:24 AM Ruby Bug #3776 (Closed): mismatch of rdoc in array.c
=begin
--- array.c~ 2010-06-11 07:21:18.000000000 +0300
+++ array.c 2010-08-31 05:36:12.844565473 +0300
@@ -1897,7 +1897,7 @@

/*
* call-seq:
- * ary.rotate([n = 1]) -> new_ary
+ * ary.rotate([cnt = 1]) -> new...
dre3k (Andrei Kulakov)
02:20 AM Ruby Bug #3775 (Closed): typo of rdoc in enum.c
=begin
--- enum.c~ 2010-08-19 17:48:25.000000000 +0300
+++ enum.c 2010-08-31 06:13:42.200564470 +0300
@@ -1911,7 +1911,7 @@
* elements from each <i>args</i>. This generates a sequence of
* <em>n</em>-element arrays, where...
dre3k (Andrei Kulakov)

08/19/2010

07:59 AM Ruby Bug #3717 (Closed): Minor mistype in Enum#inject documentation
=begin
There is a missing forward slash in enum.c at line 530 that cause rdoc
to generate broken output. Bug exists in ruby1.9.2p0 and ruby1.9.3dev.

--- enum.c 2010-08-19 01:22:53.000000000 +0300
+++ enum.c 2010-08-19 01:30:38....
dre3k (Andrei Kulakov)

Also available in: Atom