Kernel#Integer should raise a TypeError when passed an argument that doesn't 
implement to_i or to_int
-----------------------------------------------------------------------------------------------------

                 Key: JRUBY-1094
                 URL: http://jira.codehaus.org/browse/JRUBY-1094
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.0.0RC3
         Environment: OS X 10.4.9, Java 1.5, JRuby 2007-06-03 rev 3812
            Reporter: Daniel Berger


All of these tests should raise a TypeError. JRuby currently raises a 
NoMethodError.
{noformat}
assert_raise(TypeError){ Integer([]) }
assert_raise(TypeError){ Integer(true) }
assert_raise(TypeError){ Integer(false) }
{noformat}
See the 'convert_type()' internal function in object.c if you're curious how 
MRI is doing things.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
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