[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[from Monkey Patching Thread]1.8 to 1.9 compatibility

Robert Dober

1/2/2009 9:28:00 PM

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


--
It is change, continuing change, inevitable change, that is the
dominant factor in society today. No sensible decision can be made any
longer without taking into account not only the world as it is, but
the world as it will be ... ~ Isaac Asimov

3 Answers

Marc Heiler

1/2/2009 10:25:00 PM

0

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. :(
--
Posted via http://www.ruby-....

Dave Thomas

1/2/2009 10:37:00 PM

0


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 =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


Nil

2/20/2011 7:40:00 PM

0

On 20 Feb 2011, JPGRFan <JPGRFan@Liverpool.com> wrote in
rec.music.beatles:

> "Nurk" <nurktwn@cfl.rr.com> wrote:
>
> If every popular commoner was buried there, it'd be nothing but
> graves from door to door.

It already is! You can't move more than a few feet without stepping on
somebody.