[ruby-core:78299] [Ruby trunk Feature#12963][Feedback] ?string longer than one char
From:
matz@...
Date:
2016-11-25 05:55:00 UTC
List:
ruby-core #78299
Issue #12963 has been updated by Yukihiro Matsumoto. Status changed from Open to Feedback Assignee set to Yukihiro Matsumoto Since ?up gives a string "up", it cannot be a replacement for :up symbol. If someone come up with an use-case for this multi-character ? string literal, I will reinvestigate. Matz. ---------------------------------------- Feature #12963: ?string longer than one char https://bugs.ruby-lang.org/issues/12963#change-61661 * Author: Nobuyoshi Nakada * Status: Feedback * Priority: Normal * Assignee: Yukihiro Matsumoto ---------------------------------------- Now Symbol as keyword argument is often used, but a space is required between the label and the symbol literal. ```ruby x.round(half: :up) ``` Or using a String argument, ```ruby x.round(half:"up") ``` Both don't feel nice to me. How about longer string literal by `?xxx`, which is currently restricted to just one character? ```ruby x.round(half:?up) ``` patch: https://github.com/nobu/ruby/tree/feature/q-string -- 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>