[#82706] [Ruby trunk Bug#13851] getting "can't modify string; temporarily locked" on non-frozen instances — cardoso_tiago@...
Issue #13851 has been updated by chucke (Tiago Cardoso).
3 messages
2017/09/07
[#82853] [Ruby trunk Bug#13916] Race condition when sending a signal to a new fork — russell.davis@...
Issue #13916 has been reported by russelldavis (Russell Davis).
3 messages
2017/09/19
[#82892] [Ruby trunk Bug#13921] buffered read_nonblock doesn't work as expected using SSLSocket — cardoso_tiago@...
Issue #13921 has been updated by chucke (Tiago Cardoso).
3 messages
2017/09/20
[ruby-core:83066] [Ruby trunk Feature#13395] Add a method to check for not nil
From:
Greg.mpls@...
Date:
2017-09-30 12:53:28 UTC
List:
ruby-core #83066
Issue #13395 has been updated by MSP-Greg (Greg L). I believe the english equivalent to `not_nil` would be `exist` (instead of exists, to follow prev use). I believe core only uses `exist?` with `Dir`, `File`, and `FileTest`. Having it would allow showing the standard case first in an if-else-end structure, given that unless-else-end may be considered 'strange' code. Also, I'm sure many of us have used a tri-state nil/false/true variable when it is helpful. ---------------------------------------- Feature #13395: Add a method to check for not nil https://bugs.ruby-lang.org/issues/13395#change-67006 * Author: JustJosh (Joshua Stowers) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- There does not seem to be a method in Ruby to check if an object is *not* nil. Such a method could help with readability. Example: > ~~~ ruby > array = [1, 'dog', nil] > array.count(&:not_nil?) > ~~~ > vs > ~~~ ruby > array = [1, 'dog', nil] > array.reject(&:nil?).count > ~~~ -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>