nobu (Nobuyoshi Nakada) wrote: > `==` and `!=` have never called `coerce`. > ... You're right about coerce not being involved here, my theory was wrong. Looking at the code fix_equal(x,y) when y was of non-core class used to call nu...taw (Tomasz Wegrzanowski)
marcandre (Marc-Andre Lafortune) wrote: > I raised this issue previously https://bugs.ruby-lang.org/issues/13583#note-8 > ... I'd say that ActiveSupport is testing group for possible new ruby features, and when getting them into ruby ...taw (Tomasz Wegrzanowski)
Oops, I meant to suggest this, accidentally said "values" instead of "keys" : class Hash def transform_keys!(&block) replace transform_keys(&block) end end taw (Tomasz Wegrzanowski)
The safest way to interact with Unix shell with ruby is using `Pathname` and multi-argument system/exec/etc. commands. In 1.8 days (and early 1.9) it was possible to do nice things like: path = Pathname("/dev/null"); system "ls...taw (Tomasz Wegrzanowski)
> A problem of the lazy behaviour that is it opens a file descriptor when > ... This won't normally be a problem as directory handler isn't opened on `to_enum`, only once iteration actually begins. Unless you put these enumerators ...taw (Tomasz Wegrzanowski)
=begin > > Integer 10 means exactly 10, not everything that would end up as 10 if rounded. 10 == 10.2 #=> false > but 10 == 10.0. 100000000000000000000000 should == 100000000000000000000000.0 > You know, if you think it should not, ...taw (Tomasz Wegrzanowski)
=begin The way <=> works on pretty much everything in Ruby is that if a <=> b return 0, 1, or -1, it completely determines the entire set of comparisons a==b, a>=b, a>b, a<=b, a<b, b<=>a, b==a, b>=a, b>a, b<=a, b<a. (and if it...taw (Tomasz Wegrzanowski)