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

Unable to get mode for Ruby 1.9 #5

Closed
davispuh opened this issue Jul 8, 2012 · 1 comment
Closed

Unable to get mode for Ruby 1.9 #5

davispuh opened this issue Jul 8, 2012 · 1 comment

Comments

@davispuh
Copy link

davispuh commented Jul 8, 2012

irb(main):002:0> Net::NTP.get.mode NoMethodError: undefined method &' for "\x1C":String
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/net-ntp-2.1.1/lib/net/ntp/ntp.r
b:120:in mode' from (irb):2 from C:/Ruby193/bin/irb:12:in

'
irb(main):003:0>`

btw it's not only place where I get such error, basically everywhere where's used

fast fix I could think of would be @mode ||= (packet_data_by_field[:byte1][0].getbyte(0) & 0x07)

and btw it's not only place where I get such error, also for version_number and leap_indicator

@marcbowes
Copy link
Contributor

My commit should fix this issue on 1.8, 1.9, 2.0 and 2.1. I've tested with rbenv on my machine.

brandonarbini pushed a commit that referenced this issue Apr 16, 2014
Fix for 1.9, expose Response#offset. Fixes #5 and fixes #6.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants