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 162751 - 'i = ? true : false' Handled Incorrectly for Ruby
Summary: 'i = ? true : false' Handled Incorrectly for Ruby
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: Other Linux
: P3 blocker (vote)
Assignee: Erno Mononen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-15 19:09 UTC by rcordner
Modified: 2009-05-21 14:53 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 rcordner 2009-04-15 19:09:11 UTC
Given the Ruby code:

i=1
j = i == 1 ? true : false
puts j

the IDE states that the value of j is nil while the puts correctly shows 'true'. This only happens if the conditional 
returns true and false. The IDE has the same problem with these related code fragments:

Fragment1:

i=1
j = case i
 when 1
  true
 else
  false
 end

Fragment 2:

i=1
j = if i == 1 then
  true
 else
  false
 end
Comment 1 Erno Mononen 2009-05-21 14:48:31 UTC
Seems to be fixed now, likely was a problem in the backend. Please reopen if you can still reproduce this with a 6.7 
build (http://bits.netbeans.org/dev/nightly/latest/).
Comment 2 Erno Mononen 2009-05-21 14:53:34 UTC
Forgot to add that please make sure you have the latest debug gems installed before testing.