[from Monkey Patching Thread]1.8 to 1.9 compatibility

R

Robert Dober

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
 
M

Marc Heiler

Robert said:
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. :(
 
D

Dave Thomas

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 =20
to tell Ruby what encoding that file is in. For example, if you =20
include a utf-8 em-dash (=97), you'd need to add the comment

# encoding: utf-8

puts "No way=97Way!"


to the top of the file.

Each file in an application can have its own encoding.


Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top