[#73707] [Ruby trunk Misc#12004] Code of Conduct — hanmac@...
Issue #12004 has been updated by Hans Mackowiak.
3 messages
2016/02/05
[#73730] [Ruby trunk Feature#12034] RegExp does not respect file encoding directive — nobu@...
Issue #12034 has been updated by Nobuyoshi Nakada.
3 messages
2016/02/07
[#73746] [Ruby trunk Feature#12034] RegExp does not respect file encoding directive — nobu@...
Issue #12034 has been updated by Nobuyoshi Nakada.
3 messages
2016/02/09
[#73919] [Ruby trunk Feature#11262] Make more objects behave like "Functions" — Ruby-Lang@...
Issue #11262 has been updated by J旦rg W Mittag.
3 messages
2016/02/22
[#74019] [Ruby trunk Bug#12103][Rejected] ruby process hangs while executing regular expression. — duerst@...
Issue #12103 has been updated by Martin D端rst.
3 messages
2016/02/27
[ruby-core:73912] [Ruby trunk Feature#12096] New notation for instance variables and class variables
From:
sawadatsuyoshi@...
Date:
2016-02-21 16:20:58 UTC
List:
ruby-core #73912
Issue #12096 has been updated by Tsuyoshi Sawada. And of course, the range of available names for there variables should be extended. And `attr_reader :foo?` should also be allowed. Another use case may be a shorthand for `instance_variable_set`/`instance_variable_get` with dynamically generated names. ---------------------------------------- Feature #12096: New notation for instance variables and class variables https://bugs.ruby-lang.org/issues/12096#change-57070 * Author: Tsuyoshi Sawada * Status: Open * Priority: Normal * Assignee: ---------------------------------------- In order to create symbols that include non-word characters, we have the `:'...'` notation: ~~~RUBY :'foo-bar' :"foo-bar" ~~~ What about extending this notation to instance variables and class variables? The use case is to solve the problems raised in #12046, #11167, #10720. There, the problem was that, even though we can have methods like `foo?` or symbols like `:foo?`, we cannot have corresponding instance variables. My proposal is to introduce a similar notation for instance variables: ~~~RUBY @'foo?' @"foo?" ~~~ I can't think of a similar use case for class variables, but there is no reason to make class variables to behave different from instance variables more than necessary, so there can also be the corresponding notation for class variables: ~~~RUBY @@'foo?' @@"foo?" ~~~ Right now, these notations raise syntax errors, so I don't think it conflicts (raises ambiguity) with the existing syntax. -- 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>