[#97086] [Ruby master Bug#16612] Enumerator::ArithmeticSequence#last with float range produces incorrect value — muraken@...
Issue #16612 has been updated by mrkn (Kenta Murata).
4 messages
2020/02/07
[#97307] [Ruby master Feature#16663] Add block or filtered forms of Kernel#caller to allow early bail-out — headius@...
Issue #16663 has been reported by headius (Charles Nutter).
29 messages
2020/02/28
[ruby-core:97074] [Ruby master Feature#12047] Set#=== (aliased to include?)
From:
jonathan@...
Date:
2020-02-06 19:23:47 UTC
List:
ruby-core #97074
Issue #12047 has been updated by jonathanhefner (Jonathan Hefner). This was added in Ruby 2.5, so I think this issue can be closed. ---------------------------------------- Feature #12047: Set#=== (aliased to include?) https://bugs.ruby-lang.org/issues/12047#change-84181 * Author: Phrogz (Gavin Kistner) * Status: Open * Priority: Normal ---------------------------------------- Add `Set#===` as an alias for `Set#include?` so that sets may be used in `case` statements: ~~~ require 'set' GOOD_COMMANDS = Set[ :foo, :bar, :jim ] BAD_COMMANDS = Set[ :baz, :bax, :jam ] ODD_COMMANDS = Set[ :quux, :xyzzy ] case my_command when GOOD_COMMANDS then puts "Yay!" when BAD_COMMANDS then puts "Boo!" when ODD_COMMANDS then puts "Whaa?" end ~~~ -- 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>