Hi
I am using ruby1.8.6 and tried
“something”.bytesize it gives error
undefined method `bytesize’ for #String:0x41f8c98
But in ruby1.8.7 it is working as expected
Thanks
Hi
I am using ruby1.8.6 and tried
“something”.bytesize it gives error
undefined method `bytesize’ for #String:0x41f8c98
But in ruby1.8.7 it is working as expected
Thanks
Well…then there’s your answer.
puts RUBY_VERSION
puts ‘str’.bytesize
–output:–
1.8.6
Line 2: undefined method `bytesize’ for “str”:String (NoMethodError)
–output:–
1.8.7
3
–output:–
1.9.2
3
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs