From: Vladimir Sizikov Date: 2010-01-13T20:42:33+09:00 Subject: [ruby-core:27583] Strange behavior of String#append in 1.9 Hi, Something is not right (or, at minimum, inconsistent) here: ruby -ve "p 'test' << -1" ruby 1.9.2dev (2010-01-13) [i686-linux] "test\xFF" ruby -ve "p 'test' << -2" ruby 1.9.2dev (2010-01-13) [i686-linux] "test\xFE" ruby -ve "p 'test' << -3" ruby 1.9.2dev (2010-01-13) [i686-linux] -e:1:in `
': negative string size (or size too big) (ArgumentError) So, what's the proper/desired/correct behavior here? Thanks, --Vladimir P.S. In JRuby, we currently always raise ArgumentError on negative values.