[#23457] [Bug #1471] "Mutual join" deadlock detection faulty in 1.8.6 and 1.8.7 — John Carter <redmine@...>

Bug #1471: "Mutual join" deadlock detection faulty in 1.8.6 and 1.8.7

17 messages 2009/05/15

[#23483] [Bug #1478] Ruby archive — Oleg Puchinin <redmine@...>

Bug #1478: Ruby archive

29 messages 2009/05/16
[#29225] [Feature #1478] Ruby archive — Luis Lavena <redmine@...> 2010/04/02

Issue #1478 has been updated by Luis Lavena.

[#30345] Re: [Feature #1478] Ruby archive — "NAKAMURA, Hiroshi" <nakahiro@...> 2010/05/21

On Fri, Apr 2, 2010 at 17:13, Luis Lavena <redmine@ruby-lang.org> wrote:

[#30346] Re: [Feature #1478] Ruby archive — Jonathan Nielsen <jonathan@...> 2010/05/21

> Thanks for your comment.

[#30347] Re: [Feature #1478] Ruby archive — Jonathan Nielsen <jonathan@...> 2010/05/21

OK Hiroshi, I read some of the comments earlier in the thread that I

[#30355] Re: [Feature #1478] Ruby archive — Caleb Clausen <vikkous@...> 2010/05/21

On 5/20/10, Jonathan Nielsen <jonathan@jmnet.us> wrote:

[#30364] Re: [Feature #1478] Ruby archive — Benoit Daloze <eregontp@...> 2010/05/22

Hi,

[#23505] [Bug #1494] tempfile#unlink may silently fail on windows — Nicholas Manning <redmine@...>

Bug #1494: tempfile#unlink may silently fail on windows

19 messages 2009/05/19

[#23572] [Bug #1525] Deadlock in Ruby 1.9's VM caused by ConditionVariable.wait and fork? — Hongli Lai <redmine@...>

Bug #1525: Deadlock in Ruby 1.9's VM caused by ConditionVariable.wait and fork?

27 messages 2009/05/27

[#23595] Meaning of RUBY_PLATFORM — Rick DeNatale <rick.denatale@...>

The RUBY_PLATFORM constant is documented in the latest Pickaxe as "The

17 messages 2009/05/28
[#23596] Re: Meaning of RUBY_PLATFORM — Luis Lavena <luislavena@...> 2009/05/28

On Thu, May 28, 2009 at 3:41 PM, Rick DeNatale <rick.denatale@gmail.com> wrote:

[#23602] Re: Meaning of RUBY_PLATFORM — Rick DeNatale <rick.denatale@...> 2009/05/28

On Thu, May 28, 2009 at 2:52 PM, Luis Lavena <luislavena@gmail.com> wrote:

[#23608] Re: Meaning of RUBY_PLATFORM — Luis Lavena <luislavena@...> 2009/05/28

On Thu, May 28, 2009 at 7:08 PM, Rick DeNatale <rick.denatale@gmail.com> wrote:

[#23609] Re: Meaning of RUBY_PLATFORM — Rick DeNatale <rick.denatale@...> 2009/05/29

On Thu, May 28, 2009 at 7:22 PM, Luis Lavena <luislavena@gmail.com> wrote:

[ruby-core:23452] [Bug #1469] Different behavior of class variables in 1.9.0 and 1.9.1p129

From: Kenneth Ballou <redmine@...>
Date: 2009-05-14 19:26:30 UTC
List: ruby-core #23452
Bug #1469: Different behavior of class variables in 1.9.0 and 1.9.1p129
http://redmine.ruby-lang.org/issues/show/1469

Author: Kenneth Ballou
Status: Open, Priority: Normal
ruby -v: ruby 1.9.1p129 (2009-05-12 revision 23412) [i686-linux]

The code in the attached file (classvars.rb) is based on the discussion of class variables on pages 337 and 338 of "Programming Ruby 1.9".  I ran the code using ruby 1.9.0 and ruby 1.9.1p129.  The output was different for the two versions, and both differ from what the book says it should be.

For 1.9.0: ruby -v reports "ruby 1.9.0 (2006-06-08) [x86_64-linux]"
For 1.9.1: ruby -v reports "ruby 1.9.1p129 (2009-05-12 revision 23412) [i686-linux]"

Output from ruby 1.9.0:

a.var: 99
a.var: 123
a.get_var: top level variable
@@var: top level variable
Holder.read_var: 123

Just in case attaching the file classvars.rb doesn't work, here is its contents:

##### begin classvars.rb
class Holder
    @@var = 99
    def Holder.var=(val)
        @@var = val
    end
    def Holder.read_var
        @@var
    end
    def var
        @@var
    end
end

@@var = "top level variable"

a = Holder.new
puts "a.var: #{a.var}"
Holder.var = 123
puts "a.var: #{a.var}"

def a.get_var
    @@var
end

puts "a.get_var: #{a.get_var}"
puts "@@var: #{@@var}"
puts "Holder.read_var: #{Holder.read_var}"
##### end classvars.rb
Output from ruby 1.9.1p129:

a.var: top level variable
a.var: 123
a.get_var: 123
@@var: 123
Holder.read_var: 123

If I understand the book correctly, the expected output would be:

a.var: top level variable
a.var: 123
a.get_var: top level variable
@@var: top level variable
Holder.read_var: 123

(I'm not sure I understand why the first call to a.var would return the string "top level variable" but the second call would return the Fixnum 123.  However, that's not part of this issue report.)


----------------------------------------
http://redmine.ruby-lang.org

In This Thread

Prev Next