# Ruby 1.9.0 crash on Kubuntu Hardy Heron

**URL:** <https://www.ruby-forum.com/t/ruby-1-9-0-crash-on-kubuntu-hardy-heron/155861>\
**Category:** Ruby\
**Created:** [December 17, 2008, 6:12pm UTC](https://www.ruby-forum.com/t/ruby-1-9-0-crash-on-kubuntu-hardy-heron/155861 "2008-12-17T18:12:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![x17y19](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/a88e57/32.png) [@x17y19](https://www.ruby-forum.com/u/x17y19)\
**Post date:** [December 17, 2008, 6:12pm UTC](https://www.ruby-forum.com/t/ruby-1-9-0-crash-on-kubuntu-hardy-heron/155861/1 "2008-12-17T18:12:22Z")

</div>

Hi,

# Ruby 1.9.0 crashes on the following code:

# class Foo def Foo.get return true if defined? @@x && @@x \<= 0 end end Foo.get

This is the version:  
clay:~/tests/ruby/bugs$ ruby1.9 -v  
ruby 1.9.0 (2007-12-25 revision 14709) [i486-linux]

This is the stack trace:  
clay:~/tests/ruby/bugs$ ruby1.9 crash.rb  
crash.rb:7: [BUG] Stack consistency error (sp: 10, bp: 9)  
ruby 1.9.0 (2007-12-25 revision 14709) [i486-linux]

## – control frame ---------- c:0004 p:0025 s:0010 b:0009 l:000008 d:000008 METHOD crash.rb:7 c:0003 p:0020 s:0006 b:0006 l:000005 d:000005 TOP crash.rb:10 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH :inherited c:0001 p:0000 s:0002 b:0002 l:000001 d:000001 TOP :17

## DBG\> : “crash.rb:10:in `’” – backtrace of native function call (Use addr2line) – 0xb7f4560c 0xb7e6d3a6 0xb7e6d402 0xb7f3ed80 0xb7f42d09 0xb7f43382 0xb7e7361b 0xb7e736e3 0x8048752 0xb7c81450 0x8048681

Aborted

---

<div class="post-metadata">

**Author:** ![x17y19](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/a88e57/32.png) [@x17y19](https://www.ruby-forum.com/u/x17y19)\
**Post date:** [December 17, 2008, 6:16pm UTC](https://www.ruby-forum.com/t/ruby-1-9-0-crash-on-kubuntu-hardy-heron/155861/2 "2008-12-17T18:16:26Z")

</div>

Bug F. wrote:

> Hi,
> 
> # Ruby 1.9.0 crashes on the following code:
> 
> # class Foo def Foo.get return true if defined? @@x && @@x \<= 0 end end Foo.get
> 
> This is the version:  
> clay:~/tests/ruby/bugs$ ruby1.9 -v  
> ruby 1.9.0 (2007-12-25 revision 14709) [i486-linux]

Your program works fine for me on 1.9.1-preview2, under Ubuntu Hardy.

$ ruby19 crash.rb  
$ ruby19 -v  
ruby 1.9.1 (2008-12-01 revision 20438) [i686-linux]  
$

So maybe you just need to upgrade.
