List Info

Thread: Re: Ruby 1.8.7-preview4 has been released




Re: Ruby 1.8.7-preview4 has been released
user name
2008-05-27 16:04:56
On May 25, 8:47 pm, "Akinori MUSHA" <k...iDaemons.org> wrote:
> The new version of Ruby includes many bug fixes, lots
of feature
> enhancements and some performance improvements since
1.8.6 while
> maintaining stability and backward compatibility with
the previous
> release to a high degree, although there are ongoing
efforts that need
> to be done toward adopting RubySpec.

Is the BasicObject class (from Ruby 1.9) planned to be
back-ported to
Ruby 1.8.x?

Also, will OpenStruct derive from BasicObject?  So that we
no longer
need to manually undef type and id to use those properties
in our open
structs?

  require 'ostruct'

  class OpenStruct
    undef type if respond_to? :type # deprecated in Ruby
1.8; removed
in 1.9
    undef id   if respond_to? :id   # same thing
  end

Thanks for your consideration.


Re: Ruby 1.8.7-preview4 has been released
country flaguser name
Japan
2008-05-29 09:52:18
AT WED, 28 MAY 2008 06:04:56 +0900,
SURAJ N. KURAPATI WROTE:
> ON MAY 25, 8:47 PM, "AKINORI MUSHA"
<K...IDAEMONS.ORG> WROTE:
> > THE NEW VERSION OF RUBY INCLUDES MANY BUG FIXES,
LOTS OF FEATURE
> > ENHANCEMENTS AND SOME PERFORMANCE IMPROVEMENTS
SINCE 1.8.6 WHILE
> > MAINTAINING STABILITY AND BACKWARD COMPATIBILITY
WITH THE PREVIOUS
> > RELEASE TO A HIGH DEGREE, ALTHOUGH THERE ARE
ONGOING EFFORTS THAT NEED
> > TO BE DONE TOWARD ADOPTING RUBYSPEC.
> 
> IS THE BASICOBJECT CLASS (FROM RUBY 1.9) PLANNED TO BE
BACK-PORTED TO
> RUBY 1.8.X?

I'M AFRAID IT IS A BIT TOO RADICAL TO CHANGE CLASS HIERARCHY
(OR
TOPOLOGY, RATHER) IN THE MIDDLE OF 1.8.  IT WOULD BREAK
CERTAIN KINDS
OF DEVELOPMENT TOOLS AND RUNTIME ENVIRONMENT (IDE/RAD
TOOLS,
SQUEAK-LIKE ENVIRONMENT, ETC.).

> ALSO, WILL OPENSTRUCT DERIVE FROM BASICOBJECT?  SO THAT
WE NO LONGER
> NEED TO MANUALLY UNDEF TYPE AND ID TO USE THOSE
PROPERTIES IN OUR OPEN
> STRUCTS?
> 
>   REQUIRE 'OSTRUCT'
> 
>   CLASS OPENSTRUCT
>     UNDEF TYPE IF RESPOND_TO? :TYPE # DEPRECATED IN
RUBY 1.8; REMOVED IN 1.9
>     UNDEF ID   IF RESPOND_TO? :ID   # SAME THING
>   END

IT WOULD BE BETTER TO UNDEFINE METHODS WITH COMMON NAMES
INDIVIDUALLY.
LOSING OBJECT_ID, CLASS, DUP, FREEZE, TAINT, ETC. IS
OVERKILL I WOULD
THINK.

-- 
AKINORI MUSHA / HTTP://AKINORI.ORG/
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )