From 837babd56459aafc1232a12fbfa783025d619b98 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 6 Nov 2015 03:39:23 +0000 Subject: change DOTQ * defs/id.def (token_ops), parse.y (parser_yylex): change DOTQ from ".?" to "&.". [ruby-core:71363] [Feature #11537] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- NEWS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 067766361e..cd3b548625 100644 --- a/NEWS +++ b/NEWS @@ -20,17 +20,17 @@ with all sufficient information, see the ChangeLog file. * safe navigation operator: - * new method call syntax, `object.?foo', method #foo is called on + * new method call syntax, `object&.foo', method #foo is called on `object' if it is not nil. this is similar to `try!' in Active Support, except: * method name is syntactically required obj.try! {} # valid - obj.? {} # syntax error + obj&. {} # syntax error * arguments are evaluated only if a call is made: obj.try!(:foo, bar()) # bar() is always evaluated - obj.?foo(bar()) # bar() is conditionally evaluated + obj&.foo(bar()) # bar() is conditionally evaluated * attribute assignment is valid - obj.?attr += 1 + obj&.attr += 1 === Core classes updates (outstanding ones only) -- cgit v1.2.3