General

Profile

tmat (Tomas Matousek)

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 11 11

Activity

11/15/2010

05:51 AM Ruby Bug #4056 (Rejected): Crash in non-blocking read
=begin
Ruby crashes when executing the attached script (a.rb).
See crash details attached in crash.log.
=end
tmat (Tomas Matousek)

09/06/2010

07:01 AM Ruby Bug #3792 (Closed): Procs created via Method#to_proc and Symbol#to_proc don't pass a block thru
=begin
class C
def foo
yield
end
end

f = :foo.to_proc
f.(C.new) { puts 'bar' } rescue p $!

m = C.new.method(:foo)
q = m.to_proc
q.() { puts 'bar' } rescue p $!

Output:

#<LocalJumpError: no block...
tmat (Tomas Matousek)

08/13/2010

08:53 AM Ruby Feature #3680: Splatting calls to_ary instead of to_a in some cases
=begin
Let's say I call File.open(C.new) where
class C
def to_str; "a.txt"; end
def method_missing name, *arg
raise NoMethodError
end
end

File.open tries at most 4 conversions: to_int, to_hash, to_path and to...
tmat (Tomas Matousek)
06:23 AM Ruby Feature #3680: Splatting calls to_ary instead of to_a in some cases
=begin
I'm confused. You're saying that in 1.9.2+ splatting operators don't call respond_to?(:to_a/:to_ary)? Almost all other conversions do call respond_to? first before calling the method itself. E.g.:

class C
def respond_to?...
tmat (Tomas Matousek)
02:36 AM Ruby Feature #3680: Splatting calls to_ary instead of to_a in some cases
=begin
OK, so this seems to be fixed. I haven't found more recent binaries for Windows than 1.9.1 so I can't test that.
So you're saying when *expr doesn't call respond_to? in 1.9.3? That looks like a bug unless splatting operations i...
tmat (Tomas Matousek)
01:37 AM Ruby Feature #3680: Splatting calls to_ary instead of to_a in some cases
=begin
I see, so there is implicit and explicit splatting. The former uses to_ary the latter to_a.

So the splatting in the following code (in when clause) should use to_a since it is an explicit one, right? It attempts to call bot...
tmat (Tomas Matousek)

08/12/2010

12:39 AM Ruby Feature #3680 (Rejected): Splatting calls to_ary instead of to_a in some cases
=begin
In some cases to_ary is called to splat an array. Shouldn't to_a be always called?

class C
def respond_to? name
p name
false
end
end

p [1,*C.new]
p(*C.new)

x,y = C.new
p x,y

proc {|a,...
tmat (Tomas Matousek)

05/14/2010

11:11 AM Ruby Bug #3290 (Rejected): File descriptors not closed when all IO objects are collected
=begin
The following script should raise an exception (invalid descriptor) on line [2] since the file object that allocated it should have been collected on line [1]. The script actually writes "hello" to the file so it seems that Ruby ...
tmat (Tomas Matousek)

05/02/2010

02:16 PM Ruby Feature #3232: Loops (while/until) should return last statement value if any, like if/unless
=begin
It returns the argument of break:

x = while true; break 123; end #=> 123

If you don't break out of the loop it makes sense that the result is nil.

Tomas

-----Original Message-----
From: Kornelius Kalnbach [mailto:mu...
tmat (Tomas Matousek)

01/17/2010

06:57 AM Ruby Bug #2611 (Closed): Hang while executing END blocks with redirected stderr
=begin
The following code hangs with CPU on 100% at a random point during execution of END blocks.

class C
def write(x)
puts "[#{x}]"
end
end

$stderr = C.new

END {
raise 'e1'
}
END {
puts 'e2'
...
tmat (Tomas Matousek)

Also available in: Atom