#764: Weird instance variable value of C extension.
--------------------------------+-------------------------------------------
 Reporter:  cheke...@…          |       Owner:  lsansone...@…        
     Type:  defect              |      Status:  new                  
 Priority:  blocker             |   Milestone:  MacRuby 0.6          
Component:  MacRuby             |    Keywords:  extension            
--------------------------------+-------------------------------------------
 When expanding a class defined in a C extension, the new instance
 variables have strange default values (correct value should be nil).

 Try execute following code in a ruby file (if input and run in macirb, the
 output is correct).

 {{{
   require 'bigdecimal'

   class BigDecimal
      def should_be_nil
          p @one
          p @two
          p @three
          p @four
          p @five
          p @six
          p @seven
      end
   end

   BigDecimal.new('0').should_be_nil
 }}}

 In my dev environment (SL10.6.4, MacRuby 0.6), the output is:

 {{{
 #<BigDecimal:2000f23c0,'0.0',4(8)>
 true
 0
 1073741824
 false
 false
 false
 }}}
 --

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/764>
MacRuby <http://macruby.org/>

_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to