Hanmac (Hans Mackowiak)

  • Email:
  • Registered on: 05/14/2011
  • Last connection: 11/17/2017




09:18 AM Ruby trunk Bug #14114: Add #step for Array, Enumerable, Enumerator
you might use `each_slice` for this:
~~~ ruby
module Enumerable
def step(n)


10:23 AM Ruby trunk Feature #14079: Validate argument list without calling method
String#prepend might be a bad example because in your cases it doesn't raise an ArgumentError anymore


08:56 AM Ruby trunk Bug #1720: [NaN] == [NaN] が true にăȘる
checkout the object id `Float::NAN.object_id != (0.0/0).object_id`
while `NAN` is a constant, `(0.0/0)` r...


12:41 PM Ruby trunk Feature #14022: String#surround
i thought i have seen something like that before, but i don't remember where
ah now i remember, it was for JQu...


07:34 AM Ruby trunk Bug #13917: Comparable#clamp is slower than using Array#min,max.
i can explain why Array#min/max isn't much slower, because it was optimized to not create Array overhead WHEN using v...


02:51 PM CommonRuby Feature #13581: Syntax sugar for method reference
my idea for optimising `&obj.method(:symbol)`
is that it already creates a proc (object) without going over a Method...
12:56 PM CommonRuby Feature #13581: Syntax sugar for method reference
k0kubun (Takashi Kokubun) wrote:
> Another idea: &obj:method
hm i like that idea, but think that might be a b...
10:10 AM CommonRuby Feature #13581: Syntax sugar for method reference
nobu (Nobuyoshi Nakada) wrote:
> `obj\.method`
i am not sure about that:
~~~ ruby
is alre...


12:27 PM Ruby trunk Bug #13837: Class attributes get overshadowed by local variables
ruby does parse the lines before exceute them.
so when ruby does read this:
~~~ ruby
bar = 0 if bar.nil?


02:42 PM Ruby trunk Bug #13799: ENV.dup returns a plain Object
the Problem:
ENV is an Hash-like Object with having singleton methods to look like an Hash, but isn't one
dup does ...

Also available in: Atom