rubinius/rubinius — Issue #1511: rb_cstr_to_inum bug?
Author: bensie
Created: 2012-01-13 18:21:57+00:00
State: open

To reproduce:

```ruby
require "openssl"
puts OpenSSL::PKey::DSA.generate(64).public_key.p.to_i
```

```
An exception occurred running rbxbug.rb
invalid string for Integer (ArgumentError)

Backtrace:
Object#__script__ at rbxbug.rb:2
Rubinius::CodeLoader#load_script at kernel/delta/codeloader.rb:65
Rubinius::CodeLoader.load_script at kernel/delta/codeloader.rb:107
Rubinius::Loader#script at kernel/loader.rb:649
Rubinius::Loader#main at kernel/loader.rb:853
```

I encountered this issue when trying to get my SSHKey gem running on rbx:
https://github.com/bensie/sshkey/blob/fd2a558260a237fb33aed7ad3290bd0fa60d2ac9/lib/sshkey.rb#L160