secure_random.rb broken on jruby (RangeError: bignum too big to convert into 
`long')
------------------------------------------------------------------------------------

                 Key: JRUBY-5776
                 URL: http://jira.codehaus.org/browse/JRUBY-5776
             Project: JRuby
          Issue Type: Bug
          Components: Standard Library
    Affects Versions: JRuby 1.6.1, JRuby 1.5.6
         Environment: any
            Reporter: Hiroshi Nakamura
            Assignee: Hiroshi Nakamura


Reported by Konstantin Haase 
(https://twitter.com/#!/konstantinhaase/status/65361482371694593)
{noformat}
% jruby161 -rsecurerandom -e 'p SecureRandom.random_number(2**31)'    
RangeError: too big for int: 2147483648
  random_number at 
/home/nahi/java/jruby-1.6.1/lib/ruby/site_ruby/shared/securerandom.rb:97
         (root) at -e:1
zsh: exit 1     /home/nahi/java/jruby-1.6.1/bin/jruby -rsecurerandom -e 
% jruby161 -rsecurerandom -e 'p SecureRandom.random_number(2**31-1)'
523601302
% 
{noformat}
(NB: I'm on 64bit box)

See also: 
http://ci.rkh.im/job/Sinatra%20(master)/rack=rack-master,ruby=jruby,tilt=tilt-1.3/293/console


-- 
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