[#69084] [Ruby trunk - Feature #11124] [Open] [PATCH] lib/*: use monotonic clock for timeouts — normalperson@...
Issue #11124 has been reported by Eric Wong.
5 messages
2015/05/06
[#69138] [Ruby trunk - Feature #11136] [PATCH] webrick: avoid fcntl module — nobu@...
Issue #11136 has been updated by Nobuyoshi Nakada.
3 messages
2015/05/12
[#69160] [Ruby trunk - Feature #11146] [PATCH] variable.c: initialize generic_iv_tbl at start — nobu@...
Issue #11146 has been updated by Nobuyoshi Nakada.
4 messages
2015/05/13
[#69175] Re: [Ruby trunk - Feature #11146] [PATCH] variable.c: initialize generic_iv_tbl at start
— Eric Wong <normalperson@...>
2015/05/13
nobu@ruby-lang.org wrote:
[ruby-core:69177] [Ruby trunk - Feature #11151] Numeric#positive? and Numeric#negative?
From:
rafaelmfranca@...
Date:
2015-05-13 21:37:54 UTC
List:
ruby-core #69177
Issue #11151 has been updated by Rafael Fran巽a. Right. Thank you for the explanation. So maybe just to `Fixnum` and `Float`? ---------------------------------------- Feature #11151: Numeric#positive? and Numeric#negative? https://bugs.ruby-lang.org/issues/11151#change-52435 * Author: Rafael Fran巽a * Status: Open * Priority: Normal * Assignee: Yukihiro Matsumoto ---------------------------------------- We just added [`Interger#positive?` and `Interger#negative?` to Active Support](https://github.com/rails/rails/commit/e54277a45da3c86fecdfa930663d7692fd083daa). I was wondering if we could get that implemented in Ruby itself and searched if it was already requested before to Ruby code. I found that it was requested in #5513, but rejected. Since they were requested with more methods, and I don't know Japanese enough to see if there are technical reasons, I thought to request just these two methods again. The implementation would be something like: ``` def positive? self > 0 end def negative? self < 0 end ``` And one of its use case is filtering, like: ``` bunch_of_numbers.select(&:positive?) ``` If this feature is accepted I can work in a patch. Related #5513 -- https://bugs.ruby-lang.org/