Eric Wong wrote: > I like this. The speedup is from reduction of allocations+GC > ... It wasn't clear from the docs if there was a way to tell which modes were supported. Thanks for looking into that! I've made an updated patch wit...phiggins (Pete Higgins)
This patch changes the Benchmark.realtime method to use the Process.clock_gettime internally when generating the time elapsed. Calling Process.clock_gettime is faster than the current way of creating Time objects. I wrote a benchmark ...phiggins (Pete Higgins)
duerst (Martin Dürst) wrote: > I don't think I agree with the proposer. The example looks good, but what about something like: > ... I certainly didn't intend for the default value to have some idea of the type of comparison done by th...phiggins (Pete Higgins)
> First of, it's a really bad idea to set the default of a hash to a mutable object: Yes, I didn't consider the problem of returning the same array for every key, and that would have to be c...phiggins (Pete Higgins)
Without this patch, nil checks might need to be done on the return value of Enumerable#group_by: $ cat test_group_by.rb a = [1, 2, 3, "a", "b"] g = a.group_by {|o| o.class } puts "Fixnums: #{g[Fixnum].size}" puts "Strings: #{g[...phiggins (Pete Higgins)
This patch adds documentation for the methods in bigdecimal/util. Additionally, I removed some comments at the top that were incorrectly applied elsewhere as documentation for the Float class.phiggins (Pete Higgins)
Per the request over here: http://redmine.ruby-lang.org/issues/4709 I've added some basic tests for Singleton after removing some example code that seemed to function as tests.phiggins (Pete Higgins)
Singleton seemed to be light on documentation, and it included some non-working example code that seemed to function as documentation and tests. In addition, a few classes and methods in the example code were picked up by Rdoc. The fi...phiggins (Pete Higgins)
Some of the methods in the Digest family were undocumented or badly formatted. This patch adds a little polish. These docs could probably stand to be restructured, but this takes care of the obvious bad spots.phiggins (Pete Higgins)