Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD: can't convert String into Integer (TypeError) in transport.rb #3

Closed
skirge opened this issue May 24, 2010 · 5 comments
Closed
Labels

Comments

@skirge
Copy link

skirge commented May 24, 2010

Following exception occurs on FreeBSD 8.0 with libixp from hg and rumai 3.2.3

[2010-05-24T07:06:11.114120 #24927] ERROR -- : can't convert String into Integer (TypeError)
/usr/local/lib/ruby/gems/1.8/gems/rumai-3.2.3/lib/rumai/ixp/transport.rb:135:in `ungetc'
/usr/local/lib/ruby/gems/1.8/gems/rumai-3.2.3/lib/rumai/ixp/transport.rb:135:in `recv'
/usr/local/lib/ruby/gems/1.8/gems/rumai-3.2.3/lib/rumai/ixp/transport.rb:122:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rumai-3.2.3/lib/rumai/ixp/transport.rb:122:in `recv'
/usr/local/lib/ruby/gems/1.8/gems/rumai-3.2.3/lib/rumai/ixp/transport.rb:121:in `loop'
/usr/local/lib/ruby/gems/1.8/gems/rumai-3.2.3/lib/rumai/ixp/transport.rb:121:in `recv'
/usr/local/lib/ruby/gems/1.8/gems/rumai-3.2.3/lib/rumai/ixp/transport.rb:178:in `talk'
/usr/local/lib/ruby/gems/1.8/gems/rumai-3.2.3/lib/rumai/ixp/transport.rb:483:in `clunk'
/usr/local/lib/ruby/gems/1.8/gems/rumai-3.2.3/lib/rumai/ixp/transport.rb:271:in `close'
/usr/local/lib/ruby/gems/1.8/gems/rumai-3.2.3/lib/rumai/ixp/transport.rb:228:in `open'
/usr/local/lib/ruby/gems/1.8/gems/rumai-3.2.3/lib/rumai/fs.rb:83:in `open'
/usr/local/lib/ruby/gems/1.8/gems/rumai-3.2.3/lib/rumai/fs.rb:101:in `each_line'
/home/quasar/.wmii-hg/wmiirc:71
@sunaku
Copy link
Owner

sunaku commented May 24, 2010

Which version of Ruby do you use?

@skirge
Copy link
Author

skirge commented May 24, 2010

It's
ruby -v
ruby 1.8.7 (2009-04-08 patchlevel 160) [amd64-freebsd8]
installed by pkg_add -r ruby

@sunaku
Copy link
Owner

sunaku commented May 24, 2010

Try changing line 133 in lib/rumai/ixp/transport.rb from:

@stream.ungetc @stream.read_nonblock(1)

to this:

@stream.ungetc @stream.read_nonblock(1).unpack('C').first

And see if the error still occurs.

@skirge
Copy link
Author

skirge commented May 24, 2010

It seems to be working much better now, thanks

@sunaku
Copy link
Owner

sunaku commented May 24, 2010

Thanks for verifying. I pushed the fix as f55faf6. Closing this issue.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants