[#9644] Determinant Problem in Matrix.rb — <noreply@...>
Bugs item #7001, was opened at 2006-12-01 03:50
This is 100% intended. You have to learn integer arithmetics when you
[#9654] Float numbers comparison — "Paulo Soeiro" <pcsoeiro@...>
Hi,
On 12/1/06, Paulo Soeiro <pcsoeiro@gmail.com> wrote:
[#9661] Dir.exist? — Kornelius Kalnbach <murphy@...>
hi!
[#9664] Bigdecimal isn't comparable — <noreply@...>
Bugs item #7045, was opened at 2006-12-04 19:20
On 12/4/06, noreply@rubyforge.org <noreply@rubyforge.org> wrote:
[#9685] Segmentation fault - bignorm() — ico@... (Ico Doornekamp)
[#9713] Sets and String subclasses — <noreply@...>
Bugs item #7253, was opened at 2006-12-13 12:26
> I would expect the second puts to return 5, not nil. In fact, I'd expect s.to_a[0] to return the same object as a.
[#9722] Kernel#system broken inside Dir.chdir(&block) if system command doesn't have shell characters — <noreply@...>
Bugs item #7278, was opened at 2006-12-14 13:59
Hi,
I bet your script /usr/local/bin/p4 is a shell script which doesn't have a
On Dec 14, 2006, at 18:57, Michael Selig wrote:
[#9725] Fixes going into 1.8.5.9 — "Zev Blut" <rubyzbibd@...>
Hello,
[#9749] System V IPC in standard library? — Steven Jenkins <steven.jenkins@...>
Back in August, I needed a semaphore to serialize access to an external
Hi,
Nobuyoshi Nakada wrote:
Hi,
[#9753] CVS freeze — SASADA Koichi <ko1@...>
Hi,
Hi,
Hi,
Hi,
Hi,
* Shugo Maeda (shugo@ruby-lang.org) wrote:
[#9794] Fwd: [Vit-core] Ruby 1.8.5-p2 Stable Version download bug-fix confusion. — James Edward Gray II <james@...>
The following is a complaint we received about the Ruby home page today.
[#9797] Where to start — "Strong Cypher" <cypherstrong@...>
-----BEGIN PGP SIGNED MESSAGE-----
[#9803] RDoc patch that fixes rb_const_define output — <noreply@...>
Patches item #7499, was opened at 2006-12-30 05:23
On 12/30/06, Eric Hodel <drbrain@segment7.net> wrote:
On Dec 30, 2006, at 19:16, Daniel Berger wrote:
On Dec 31, 2006, at 24:31, Eric Hodel wrote:
[#9816] merge YARV — SASADA Koichi <ko1@...>
Hi,
Delegation and 1.9
Hello,
Consider the following two irb sessions, one with 1.8.5 and the other
with 1.9.0 :
irb(main):001:0> RUBY_VERSION
=> "1.8.5"
irb(main):002:0> require 'delegate'
=> true
irb(main):003:0> class Cookie < DelegateClass(Array)
irb(main):004:1> attr_reader :name
irb(main):005:1> def initialize(name)
irb(main):006:2> @name = name
irb(main):007:2> end
irb(main):008:1> end
=> nil
irb(main):009:0>
irb(main):010:0* c = Cookie.new('chrismas')
=> nil
irb(main):011:0> c.class
=> Cookie
irb(main):012:0> c.name
=> "chrismas"
Thats normal (for me !) behaviour. Now the same with 1.9.0:
irb(main):001:0> RUBY_VERSION
=> "1.9.0"
irb(main):002:0> require 'delegate'
=> true
irb(main):003:0> class Cookie < DelegateClass(Array)
irb(main):004:1> attr_reader :name
irb(main):005:1> def initialize(name)
irb(main):006:2> @name = name
irb(main):007:2> end
irb(main):008:1> end
=> nil
irb(main):009:0>
irb(main):010:0* c = Cookie.new('chrismas')
=> nil
irb(main):011:0> c.class
=> NilClass <--------------------- LOOK HERE ---------------------
irb(main):012:0> c.name
=> "chrismas"
irb(main):013:0> c.kind_of? Cookie
=> false <---------------------- Surprising !!!
irb(main):014:0> c.nil?
=> true <------------------ HUH ???
irb(main):015:0> c.__id__
=> -605609388
irb(main):016:0> nil.__id__
=> 4
irb(main):017:0> c == nil
=> true
irb(main):018:0> nil.name
NoMethodError: undefined method `name' for nil:NilClass
from (irb):29:in `Kernel#binding'
from /opt/ruby19/lib/ruby/1.9/delegate.rb:284
irb(main):019:0> c.name
=> "chrismas"
Hmmm... now the cookie's class is NilClass, not Cookie. We have c ==
nil, but they are clearly two different objects and only c has the
'name' method. I will have to reconsider my understanding of ==
This behaviour make problem with cgi.rb library: when a cgi object
ouputs it's header at line 616, the test
options["cookie"].kind_of?(Cookie)
fails, and the cookie isn't set back properly.
Bug in cgi.rb or delegate.rb ? My bet is on the later :-)
Merry Christmas
Francois