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 167815 - Go to source from Navigator with Ruby 1.9 takes to the wrong location
Summary: Go to source from Navigator with Ruby 1.9 takes to the wrong location
Status: NEW
Alias: None
Product: ruby
Classification: Unclassified
Component: Editing (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@ruby
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-29 15:14 UTC by Erno Mononen
Modified: 2011-01-28 20:13 UTC (History)
1 user (show)

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 Erno Mononen 2009-06-29 15:14:57 UTC
E.g. 

a = {:a => 'x', :b => 'z'}

def foo(param)
  puts param
end

v = foo(a)

See http://forums.netbeans.org/topic13788.html
Comment 1 Erno Mononen 2010-04-22 13:09:17 UTC
Still there.
Comment 2 chaukmean 2010-05-31 10:25:13 UTC
Hi,
Any update for this issue ?
Comment 3 chaukmean 2010-06-09 13:55:37 UTC
Hi,

Could you please fix this issue ?
As indicated in my latest post, this is a general issue if the parser is in 1.9 compatibility mode (even if the new hash syntax is not used).
This affects the location of all top level elements :
- top level variables
- top level modules
- top level classes
- top level functions

This is rather annoying.
As ruby-1.9.x will be more and more widespread with the upcoming ruby-1.9.2, the fix will benefit a lot of users.
Comment 4 Erno Mononen 2010-06-10 11:19:31 UTC
I'll try to give this another look soon, I actually already spent some time investigating this, but didn't figure out the root cause. Hopefully I'll have better luck with a fresh look at this.
Comment 5 chaukmean 2010-06-10 17:00:26 UTC
I hope that you will be able to find the cause of this issue.

Otherwise, there should be at least an option to disable the automatic compatibility mode.
When you use JRuby, you have the opportunity to choose the compatibility mode.
When you use MRI 1.9.1 (Matz Ruby) the compatibility mode is automatically set to 1.9. A simple temporary workaround could be to offer the ability to disable this behaviour.
Comment 6 Erno Mononen 2010-06-11 10:16:23 UTC
Yes, that makes sense. I've wanted to add a combo box for source level in any case as currently switching JRuby to 1.9 mode is a bit awkward.
Comment 7 chaukmean 2010-08-25 12:46:17 UTC
Hi,

Could you please consider fixing this issue or providing a workaround (e.g. choice between 1.9 and 1.8 compatibility mode) ?
Thanks.