1.8 to 1.9 compatibility


#1

As I said in the former thread, I have given some thoughts on this.
But I am not a guru and I would like many more opinions on this.

90% of the possible things are quite trivial or easy, like using
enumerator, defining methods like String#to_bytes or Integer#pred.
I do not really know where the main difficulties are, Fibers cannot be
done easily and I assume that a Thread based fiber implementation
might be ultra slow.

Cheers
Robert


#2

Robert D. wrote:

As I said in the former thread, I have given some thoughts on this.
But I am not a guru and I would like many more opinions on this.

90% of the possible things are quite trivial or easy, like using
enumerator, defining methods like String#to_bytes or Integer#pred.
I do not really know where the main difficulties are, Fibers cannot be
done easily and I assume that a Thread based fiber implementation
might be ultra slow.

Cheers
Robert

Maybe someone can do a summary… I myself am struggling with it,
especially the encodings. This gives me headache, for .rb files which
worked flawlessly with ruby 1.8.x now give me US ASCII errors. :frowning:


#3

On Jan 2, 2009, at 4:24 PM, Marc H. wrote:

Maybe someone can do a summary… I myself am struggling with it,
especially the encodings. This gives me headache, for .rb files which
worked flawlessly with ruby 1.8.x now give me US ASCII errors

If a file contains any characters with the top bit set, you now have
to tell Ruby what encoding that file is in. For example, if you
include a utf-8 em-dash (—), you’d need to add the comment

encoding: utf-8

puts “No way—Way!”

to the top of the file.

Each file in an application can have its own encoding.

Dave