This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 192338 - editor: block local variable (IDENTIFIER SQUARE IS NOT VALID TO GET)
Summary: editor: block local variable (IDENTIFIER SQUARE IS NOT VALID TO GET)
Status: NEW
Alias: None
Product: ruby
Classification: Unclassified
Component: Editing (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: issues@ruby
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-23 13:00 UTC by alexander.vasilenko
Modified: 2011-01-28 20:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alexander.vasilenko 2010-11-23 13:00:52 UTC
sum = 0
[1, 2, 3, 4].each do |value; square| #-- IDENTIFIER SQUARE IS NOT VALID TO GET
  square = value * value # this is a different variable
  sum += square
end
puts sum
puts square

!! According to Ruby 1.9 feature (block local variable) i's valid
Sincerely, Alexander