Forum: Ruby 1.8 to 1.9 compatibility

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
703fbc991fd63e0e1db54dca9ea31b53?d=identicon&s=25 Robert Dober (Guest)
on 2009-01-02 22:30
(Received via mailing list)
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
4828d528e2e46f7c8160c336eb332836?d=identicon&s=25 Robert Heiler (shevegen)
on 2009-01-02 23:25
Robert Dober 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. :(
5d06917e13b29bcff1c1609492c06873?d=identicon&s=25 Dave Thomas (Guest)
on 2009-01-02 23:38
(Received via mailing list)
On Jan 2, 2009, at 4:24 PM, Marc Heiler 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
This topic is locked and can not be replied to.