Rational does not have to_i method when --debug flag is set
-----------------------------------------------------------

                 Key: JRUBY-6142
                 URL: https://jira.codehaus.org/browse/JRUBY-6142
             Project: JRuby
          Issue Type: Bug
          Components: Ruby 1.9.2
    Affects Versions: JRuby 1.6.4
         Environment: Windows7
            Reporter: Lelon Stoldt
            Assignee: Thomas E Enebo
         Attachments: 
0001-Move-to_i-so-it-gets-picked-up-by-DefaultTypePopulat.patch

When started with --debug flag, attempting to call (0/1).rationalize.to_i will 
result in error.

In RubyModule, defineAnnotatedMethod grabs the first JavaMethodDescriptor from 
'methods', which in this case does't have "to_i" as part of its annotation, 
because its the version of truncate that accepts a parameter.

I'm not sure if the problem is in the DefaultTypePopulator or in the way 
RubyRational is using annotations.

I've attached the simplest fix which is what I'm currently using. I can't run 
tests on windows but it appears a to_i test already exists for Rational. I'm 
curious if it passes when in --debug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to