ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> ruby-talk
ruby-talk
precedence of single-line rescue and assignment
by Matt Neuburg other posts by this author
May 7 2008 10:40AM messages near this date
Re: hash adding values | Re: precedence of single-line rescue and assignment
def boom
  raise "boom"
end
y = ""
y = boom rescue "fine"
puts y # "fine"

So far so good; the precedence of "rescue" is higher than that of
assignment. But now:

def boom
  raise "boom"
end
y = ""
y += boom rescue "fine"
puts y # ""

How does the precedence work here, and should this behavior be
considered a possible bug? m.

-- 
matt neuburg, phd = matt@[...].com, http://www.tidbits.com/matt/
Leopard - http://www.takecontrolbooks.com/leopard-customizing.html
AppleScript - http://www.amazon.com/gp/product/0596102119
Read TidBITS! It's free and smart. http://www.tidbits.com
Thread:
Matt Neuburg
Matt Neuburg
Matt Neuburg
Matt Neuburg
Yukihiro Matsumoto
Matt Neuburg
Robert Dober
Jens Wille
Albert Schlef
Jens Wille

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved