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

Summary: 'i = ? true : false' Handled Incorrectly for Ruby
Product: ruby Reporter: rcordner <rcordner>
Component: DebuggerAssignee: Erno Mononen <emononen>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: Other   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

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.