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 `<main>': 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.