Forum: IronRuby IronRuby hosting: self becomes nil

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Alex 2. (Guest)
on 2009-01-09 04:50
Attachment: snippet.txt (0 Bytes)
Hello,

I get very odd results with attached code:

- - -
#<System::Windows::Forms::Form:0x000005c>
nil
#<System::Windows::Forms::Form:0x000005e>
- - -

While was expected
- - -
#<System::Windows::Forms::Form:0x000005c>
#<System::Windows::Forms::Form:0x000005c>
#<System::Windows::Forms::Form:0x000005e>
- - -

The 'nil' is printed by this expression:
  form = form.test

and the test method definition is:

  class Object
    def test
      p self
    end
  end

The hint: 'form' variable was set by the script host (SetVariable).

I am using DLR-0.9.

Thanks,
- Alex
Alex 2. (Guest)
on 2009-01-10 01:59
Hello,

Should I report this as IronRuby bug?

- Alex
Tomas M. (Guest)
on 2009-01-10 02:56
(Received via mailing list)
Yes, please.

Thanks,
Tomas
Alex 2. (Guest)
on 2009-01-10 11:24
Submitted as Bug # 23512.

http://rubyforge.org/tracker/index.php?func=detail...

BTW, Tomas, thank you for your responses!

- Alex
This topic is locked and can not be replied to.