11367-12635

11145-12694 subjects 11576-13175

BUG: next in lambda: 1.8.6 differs from 1.8.4 and 1.9.0
11367 [david@da id ] A toplevel next statement in a lambda does not return a value in 1.8.6,
11370 [nobu@ru y- a] The latest 1.8.6 in SVN returns the same result.
11389 [david@da id ] Nobu,
11392 [nobu@ru y- a] The latter, as 1.8.4 and 1.9.0.

$2000 USD Reward for help fixing Segmentation Fault in GC
11368 [brent@mb ri ] Help!
+ 11371 [dooby@d1 .k ] Maybe you've tried already but, if you can afford the reduced
| 11379 [znmeb@ce ma ] Perhaps they are looking to pay someone $2000US to do that for them. ;)
| 11383 [brent@mb ri ] Daz,
| + 11384 [dooby@d1 .k ] After posting, I found a response from Paul to your earlier thread ...
| | 11387 [zimbatm@or e] ...
| + 11394 [znmeb@ce ma ] Oh ... I missed that -- you're running Ruby 1.6.8? I know 1.8.5 compiles
|   11395 [brent@mb ri ] Zimbatm,
|   11396 [brent@mb ri ] Sylvain,
|   + 11397 [snowbender@g] Brent, Sylvain,
|   | 11398 [sylvain.joye] It depends on the bug. The most likely bug you'll get because of GC is either
|   + 11400 [khaines@en g] I've used valgrind on Ruby before to help track down memory leaks.  It
|     11427 [brent@mb ri ] Per the suggestion of ggarra and Sylvain, I've been running our robotic
+ 11372 [sur.max@gm i] ...
| 11374 [meinrad.rech] be warned, though, that using weakref extensively can result in
| 11375 [sur.max@gm i] ...
| 11376 [meinrad.rech] require "weakref"
+ 11388 [sylvain.joye] If you can run your application on x86 and still have the crash, run the
  11399 [sylvain.joye] ...

Net::Telnet and EOF
11373 [B.Candler@po] I've noticed what appears to be an inconsistency in the behaviour of
11378 [B.Candler@po] And for that matter, IO#expect isn't much better behaved, in that it raises
11380 [B.Candler@po] Here are some lightly-tested patches.
11381 [B.Candler@po] ... and I just noticed a corresponding change is needed to net/telnets.rb

unsubscribe
11382 [halldorgud@g] ...

[PATCH] URI::Generic: remove [] from IPv6 hosts
11385 [stephan@sp c] When parsing an URI such as "http://[::1]/..." the host part will be
11386 [ryand-ruby@z] Please file a bug on rubyforge. That way we can all stay on top of it.

Procs and bindings in 1.9
11390 [david@da id ] The Proc#binding method has disappeared in 1.9.0 (my build is from two
11393 [matz@ru y- a] I will ask the YARV maintainer.  Wait for a while.
12635 [david@da id ] I'm still wondering whether Ruby 1.9 will support Proc.binding and

Proc.==
11401 [david@da id ] Can anyone construct two proc objects p1 and p2, without using clone or
11402 [nobu@ru y- a] p proc{} == proc{}
11403 [david@da id ] Okay, anything other than the degenerate case of a proc with no body?
11404 [drbrain@se m] A proc is more than just its body.
11408 [david@da id ] Return +true+ if _prc_ is the same object as _other_proc_, or if
+ 11410 [drbrain@se m] Proc#== works no differently than Object#==.  proc {} == proc {} due
| + 11413 [nex342@gm il] I think David's point isn't that "proc { foo } == proc { foo }" should
| + 11415 [david@da id ] Eric,
+ 11411 [ryand-ruby@z] => #<Proc:0x0033912c@(irb):3>
+ 11416 [nobu@ru y- a] It may be changed in 1.9, because a Proc doesn't behave as a

JSON/YAML: Different Interface?
11405 [murphy@ru yc] horray to the new JSON library. but why is it "JSON.generate" instead of
11424 [naruse@ai em] Hmm, YAML seems inherit Marshal#load/dump.  It has reasons that JSON

[PATCH] Some small bug fixes for Ruby 1.9
11406 [flori@ni e. ] ...
11407 [nobu@ru y- a] For cross-compiling?

Method introspection ?
11409 [zimbatm@or e] ...
+ 11412 [david@da id ] Try Module.instance_methods(false).
| 11975 [zimbatm@or e] Thanks David, this is exactly what I was looking for
+ 11414 [mmiller@hi k] I've also wondered if there is an elegant way to do this.  As you

Re: [PATCH] Another small bug fix for Ruby 1.9 and a request for clarification
11417 [flori@ni e. ] ...

currying in Ruby
11418 [david@da id ] I've written a little argument currying module for Procs and Methods.  I
11419 [vshepelev@im] * The usual problem with proc currying: instance_eval (and instance_exec in
11420 [david@da id ] Thanks for your response, Victor.
11421 [vshepelev@im] BTW, I've noticed we are at ruby-core. I think, it's offtopic here. Maybe we

Re: Patching win32 ruby fopen/opendir/stat/rename/unlink to work with UTF8 paths?
11423 [djberg96@gm ] You can look here for how to implement it in Windows. I have no idea

Odd beaviour with Fixnum#div on negative numbers with floats
11426 [florgro@gm i] I'm just going through Rubinius' specification suite making sure that
11428 [lists@be tr ] irb(main):001:0> -1.div(2.0)

Thread test failure with 1.8.6-p36, OS X
11429 [djberg96@gm ] Ruby 1.8.6-36
11430 [shyouhei@ru ] I think this failure can be intensional and described in the log below?

Are there a better set of unit tests for Array?
11431 [jflam@mi ro ] a)      Extracted from the Ruby source distribution and
+ 11433 [ntalbott@gm ] Have you looked at http://rubyforge.org/projects/rubytests?
+ 11434 [djberg96@gm ] cvs -d :pserver:anonymous@rubyforge.org:/var/cvs/shards login
+ 11435 [charles.nutt] JRuby aggregates all tests that currently exist, so it's
  11438 [jflam@mi ro ] The array tests from ruby_tests are *much* better. Now I just have to make IronRuby pass them :)

comments needed for Random class
11439 [nakahiro@sa ] # Especially to Technorama Ltd.
+ 11440 [djberg96@gm ] Ideas from Python can be found at: http://docs.python.org/lib/module-random.html
| 11443 [ggarra@ad an] Python's module in this area is very good and comprehensive.  I like the
| + 11446 [hgs@dm .a .u] Problem with this is that gaussian distributions need the centre and
| | 11447 [meinrad.rech] Quasi-random numbers like Halton Sequences and other low-discrepancy
| + 11448 [steven.jenki] I urge caution. Generation of random variates requires considerable
+ 11441 [david@da id ] Since 0 and 1 are both treated as true in Ruby, it would be nice if the
| + 11444 [ggarra@ad an] -1 on this.  This is an idea mainly to reduce typing a method (like
| + 11445 [dan-ml@da 42] I second this. The idiom "a+rand(b-a)" is just too frequent and deserves
+ 11442 [transfire@gm] ...
+ 11449 [steven@lu os] Random#seed          # returns the most recently used seed
+ 11471 [nakahiro@sa ] Thanks all for your comments.
  + 11473 [dan-ml@da 42] a float in the range 1.1 <= n < 3.1, same as 1.1+rand*(3.1-1.1)
  | 11486 [shyouhei@ru ] The world is not *that* simple.
  + 11502 [steven@lu os] I intended something that just returns the result of random_seed()

Re: new method dispatch rule (matz' proposal)
11450 [david@da id ] This is a late response to the very long thread that started back in
+ 11451 [meinrad.rech] I strongly disagree here. While I think it is good to protect private
| 11452 [david@da id ] Meinrad,
| + 11453 [transfire@gm] class X
| + 11455 [meinrad.rech] Hmm, but if there is something about a superclass which cannot be
+ 11454 [dan-ml@da 42] class Test2 < Test; end
| + 11456 [alex@bl ck e] That ends up looking a lot like a magical side-effect to me.  Besides, I
| + 11461 [david@da id ] Sorry, everyone!  As Daniel and others have pointed out my analogy of
|   11489 [steven@lu os] Maybe I'm confused, which of these are you talking about?
|   + 11490 [transfire@gm] #=> Error: The mighty class author forbids you to reimplement @f.
|   + 11493 [david@da id ] Steve,
|     + 11495 [transfire@gm] One worry I have about the prefix is how would one include a module as
|     + 11503 [steven@lu os] I think I get it now.
+ 11458 [rick.denatal] I would argue that there's really no technical defense against the
  11459 [Daniel.Berge] I'd settle for a warning when run with -w. This code emits a warning
  11460 [rick.denatal] I'm not sure it should. Overriding a method is perfectly natural,
  11467 [dan-ml@da 42] Sometimes but IMHO rarely. If the parent class has some implementation,

Inclusion of bug #9376 in 1.8.6 branch
11457 [sylvain.joye] Would it be possible to include the fix for bug #9376 in 1.8.6 ? It is not
11487 [shyouhei@ru ] Hmm.
+ 11488 [matz@ru y- a] I myself consider it a bug to be fixed.
+ 11501 [sylvain.joye] It is completely harmless. It only allows to do things that were forbidden

What should this code do?
11462 [jflam@mi ro ] Thinking about control flow these days ...
+ 11463 [transfire@gm] 'class' creates an isolated scope, so I would expect it to raise an
+ 11464 [mental@ry ia] It should print 0 and then exit the loop.  Class and module scopes don't have any special influence on control flow.
  + 11465 [jflam@mi ro ] We can run the code through CRuby and observe the behavior. We just weren't sure whether the behavior that we saw was a bug or not :)
  + 11466 [transfire@gm] So Foo is never created? And yet if you subclass with and inherited
  + 11468 [charles.nutt] Confirmed also with JRuby. 0 then exit.

Array#slice!() expands array inconsistently
11469 [florgro@gm i] I just stumbled upon this behaviour while specifying Array methods for

Taint mode for arrays
11470 [florgro@gm i] I'm wondering -- is taint mode supposed to work for arrays?

Strange Array#transpose behavior for custom to_ary method
11472 [djberg96@gm ] Ruby 1.8.6 p36
11474 [matz@ru y- a] No, to_ary is to convert non-array object into array when it's used as
11476 [djberg96@gm ] Can we say then, as a general rule, that defining a custom to_ary method
11477 [matz@ru y- a] I don't call it "undefined", but it might be differ from _your_

Re: UPDATED: Building 1.8.6-p36 with Sun Studio 12 compiler
11475 [ryand-ruby@z] Please send reports like this to ruby-core, where they can make a

Error in ancestor?
11478 [robert.dober] I just observed this (and it cost me quite some effort to debug my code :( )
11479 [rick.denatal] ancestors is one of those methods, like class, which skip over
11480 [robert.dober] so you'd say it works as intended, I am not sure I like it because it

Ancestors for Singleton classes
11481 [robert.dober] ...
11507 [sylvain.joye] As there were no consensus on the last discussion about this, I've reopened
11520 [sylvain.joye] At least things are clear now ... ;-)

Ruby Changes Its Mind About Non-Word Characters
11482 [james@gr yp ] Does this look like a bug to anyone else?
+ 11483 [znmeb@ce ma ] Which one is "wrong"?
| 11485 [florgro@gm i] I'd view ? and ? as the same kind of punctuation as ". So it's not a
| 11492 [james@gr yp ] I agree.
+ 11484 [vincent.isam] Did you check what the iconv evaluates to?
| 11491 [james@gr yp ] The characters were in UTF-8, which is why I asked iconv to convert
| 11494 [vincent.isam] Sorry, my mistake, ? and ? are indeed in ISO 8859-1. It's just that
| 11496 [vincent.isam] I just checked in ruby 1.8.6's code what was done and it is indeed
| 11497 [vincent.isam] % ruby-1.9  <<< 'p "?recode?" =~ /\brecode\b/' -KU
+ 11498 [matz@ru y- a] 1.8 regexp does not recognize non-ascii character punctuation.  They

Can't build extensions with g++
11499 [djberg96@gm ] Ruby 1.8.6-p36
11500 [mynamewasgon] It's been fixed in svn.

Behaviour of Enumerables reject vs. select mixed into Hash
11504 [aljoscha@we ] irb(main):001:0> a = {'foo' => 'bar', 'baz' => 'qux'}

Question about the patchlevel release cycle
11505 [sylvain.joye] 1.8.6 thread support was broken in bad ways. It stayed for three months
+ 11506 [ryand-ruby@z] could you refer to bug #s?
| + 11508 [mynamewasgon] I didn't see a bug for the extension compilation issue, but the fix
| + 11509 [sylvain.joye] unfortunately, I don't find the bugreport. It has been discussed first on
|   11510 [nobu@ru y- a] And the next report is [ruby-dev:30653], which the following
|   11511 [sylvain.joye] Could you explain more what you're meaning ? (it does not crash here, with p36
|   11515 [nobu@ru y- a] [ruby-dev:30653] is for 2007-03-20, and p36 does contain the
|   11516 [Daniel.Berge] 6&atid=1700
|   11517 [nobu@ru y- a] Hmm, I've been aware of it too, and changed to return the
+ 11512 [shyouhei@ru ] Well, use Subversion.
  + 11513 [sylvain.joye] I already do, and I will NEVER use a ruby release AGAIN, and won't upgrade
  | 11514 [sylvain.joye] To clarify a bit: I'm not telling that a patchlevel release should be done
  + 11518 [alexey.verkh] As a downstream packager of sorts (http://rubyworks.thoughtworks.com),
  | 11521 [hramrach@ce ] The commit messages should include that so it's only a matter of
  | + 11522 [ser@ge ma e-] charset="utf-8"
  | | 11523 [hgs@dm .a .u] Ruby has some RSS support, but the English docs are rather minimal at
  | + 11524 [shyouhei@ru ] You have ruby-cvs mailing list.
  |   11526 [hgs@dm .a .u] which has an RSS feed.
  + 11519 [hramrach@ce ] I think that shortening the release interval is not the thing that is needed.
    11525 [shyouhei@ru ] We already did this. 1.8.6 was released after experiencing some preview

Unnecessary varargs for rb_hash_select
11527 [Daniel.Berge] @@ -853,16 +853,11 @@
11528 [matz@ru y- a] Merged.

SignalException.new bugs
11529 [djberg96@gm ] Since RubyForge bug reports no longer seemed to get mirrored here...
11530 [ryand-ruby@z] Can we turn that back on please? I've caught up with all the bugs.

Bench mark programs
11531 [denigeorge@c] Can i get some bench mark programs.
11532 [znmeb@ce ma ] svn checkout svn://rubyforge.org/var/svn/cougar/trunk/MatrixBenchmark

method_missing for Enumerator
11533 [transfire@gm] What do others think of this for 1.9+?
11534 [matz@ru y- a] Although I really love the idea like this, this is too dangerous for
+ 11535 [rick.denatal] I had the same reaction.  There are issues with how you compose uses
| 11536 [transfire@gm] It doesn't explain how the conflict was arising. It's usually pretty
| 11538 [rick.denatal] The problem is when you can't in general tell if the methods overlap.
+ 11537 [transfire@gm] Hey, hey, easy with the language. I'm sure DHH would agree, were
  11539 [dan-ml@da 42] Maybe making it more explicit would remove a lot of the perceived

Efficient storage for messages
11540 [gaspard@te i] ...
11541 [ryand-ruby@z] you'll have better luck/feedback by writing ruby-talk instead of ruby-

Re: Apple reportedly to ship with ruby 1.8.6-p36 unless informed what to patch
11543 [james@gr yp ] What Apple was asking me for today is a small code snippet that shows
+ 11544 [sylvain.joye] Having a "small code snippet" to show threading-related problems is often
+ 11564 [shyouhei@ru ] I've not yet succeed to make one, but perhaps Nobu did.  He gave us two
  11565 [james@gr yp ] Yeah, we have found the fixes.  What we need is to reliably be able
  11566 [laurent.sans] For the moment I have been unable to reproduce the problem on my
  11572 [vincent.isam] % ruby -ve 'require "timeout" ; Timeout.timeout(5) { puts `df -h` }'
  11574 [vincent.isam] I forgot to say I also tried 1.8.6-p36 patched with the patch Nobu
  11577 [lyle.johnson] I haven't seen it mentioned explicitly in this thread so far, but I
  11579 [laurent.sans] I reproduce this problem and will accordingly patch our build to
  11580 [laurent.sans] (Note that this bug only seems to affect C++ extensions. Regular C

Proc initialize method not called under certain circumstances
11545 [jflam@mi ro ] class Proc
11546 [mental@ry ia] Here, the Proc object is created the normal way.
11547 [jflam@mi ro ] So, is it correct to assume that for language constructs that create built-in types like Range, Array, Hash etc that user-defined initialize methods are never called?
+ 11549 [Daniel.Berge] Correct. Unfortunately.
+ 11550 [mental@ry ia] Yes.  Generally, Class.new calls .allocate and then #initialize on the returned
| 11553 [marcel@ve ni] It's not just a matter of "no guarantee", it straight up does not happen much
+ 11554 [murphy@ru yc] I would feel much better if I knew the reason for that. and please don't
  11560 [matz@ru y- a] If we allow users to intercept every object allocation, it would cause

NilClass, TrueClass, FalseClass special cased for singleton classes?
11548 [jflam@mi ro ] class << nil
+ 11557 [nobu@ru y- a] No.
+ 11559 [vjoel@pa h. ] Is that really a special case, as far as behavior goes? The

Name of Classes
11555 [wonado@do ne] Moin, moin!
11558 [nobu@ru y- a] Moin,

[BUG] delete_if with destructive methods in block
11556 [florgro@gm i] h = {1 => 2, 3 => 4, 5 => 6}
11561 [nobu@ru y- a] The second is outputed from the block called by Hash#delete

[BUG] Can clear frozen array using initialize()
11562 [florgro@gm i] ary = [1, 2, 3]
11563 [matz@ru y- a] Fixed now.  Thank you.

Re: delete_if with destructive methods in block
11567 [florgro@gm i] That fixes it for me. I got no regressions from Rubinius' hash spec

[BUG] String#rindex with Regexp in 1.9
11568 [florgro@gm i] in 1.8: (ruby 1.8.4 (2005-12-24))

sprintf: Format specifier tokens aren't checked well enough
11569 [florgro@gm i] all of these format specifiers are currently considered valid by Ruby
+ 11570 [florgro@gm i] It's also possible to specify the precision multiple times with
+ 11571 [florgro@gm i] This can be fixed by moving "case '\0':" before "p--" in sprintf.c.
+ 11573 [florgro@gm i] irb(main):001:0> "%.25555555555555555555555555555555555555s" % "hello
+ 11575 [florgro@gm i] big = -(2 ** 80 + 5)
  + 11703 [nobu@ru y- a] I'm not sure if this is broken.  Can you explain the results
  | + 11705 [florgro@gm i] I'd expect negative bignums to produce results with at least two dots
  | + 11708 [akr@fs j. rg] % ./ruby -ve '(-0xfffffffe).downto(-0x100000001) {|v| printf "%u\n", v }'
  | | 11712 [matz@ru y- a] After thinking while, I'd rather take No.3.
  | + 11838 [florgro@gm i] Sorry for not discovering this earlier, but there is a small
  |   11839 [nobu@ru y- a] Thank you, fixed now.
  + 11713 [matz@ru y- a] Right.
threads.html
top