track File.realpath


I am wondering why there are missing API methods:
  1. File.realpath
    Maybe there others but this ones I needed them.
    Thank you!


wrote Jul 28, 2011 at 9:57 PM

File.realpath is a Ruby 1.9 method we haven't gotten to.
We're unable to implement those methods of ObjectSpace as we can't track them ourselves as we don't know when the CLR will garbage collect a specific object, and we don't have access to a list of reachable objects.
Renaming this issue to track File.realpath

wrote Jul 29, 2011 at 6:25 AM

iulianfecioru wrote Jul 29, 2011 at 6:27 AM

From the previous comment I understand that methods from ObjectSpace (_id2ref, count_objects.) will not be supported.
Is this true?!

PS: I've added _id2ref method to the ObjectSpace, so I think it is posible but is just my opinion ;)

jimmysch wrote Jul 29, 2011 at 2:50 PM

How did you implement _id2ref in IronRuby? I'm 100% sure we can't implement it without slowing down the entire runtime. ObjectSpace is a thin wrapper around MRI's memory manager, while on the CLR we don't have access to it. Therefore, it's more MRI's implementation detail than a general Ruby feature. And Ruby library writers already know not to use it if they want to run on all Ruby implementations.

That being said, we could implement it poorly and require the user to turn it on if they want to use it (like JRuby does: http://kenai.com/projects/jruby/pages/PerformanceTuning#Disabling_ObjectSpace), but I don't see that as a priority feature. That being said, patches are welcome. If you want to discuss this further, let's move this discussion to the mailing list (ironruby-core@rubyforge.org) or open a new feature request (http://ironruby.codeplex.com/WorkItem/Create).

wrote Feb 22, 2013 at 12:39 AM

iulianfecioru wrote Apr 23, 2013 at 6:41 AM

SOLUTION: Issue fixed. Added missing method.