From sb at dev-heaven.net Wed Jul 20 08:37:35 2011 From: sb at dev-heaven.net (Sickboy) Date: Wed, 20 Jul 2011 14:37:35 +0200 Subject: [Ironruby-core] Access Top Level methods In-Reply-To: <4E0CD56A.5010203@polypaths.com> References: <4E0CD56A.5010203@polypaths.com> Message-ID: I cannot reproduce this issue with IronRuby 1.1.3.0 on .NET 4.0.30319.235 It works as expected: ir.exe result is same as irb result. Regards From: Lewis Lin Sent: Thursday, June 30, 2011 9:58 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Access Top Level methods Hi, I am trying to access top level method from the class definition in IronRuby scripts. Example: def global_hi end class A def hi global_hi end end A.new.hi The script executed in ScriptEngine throws a NoSuchMethodError. I tried to ran the same code in iirb.exe It seems to behave the way I expected. But when I tried it in ir.exe, it throws the exception as well. I investigate a little more and found out irb(main):021:0> self.method(:global_hi) => # and in ir.exe as well as script engine >>> self.method(:xx) => #>)#xx> Is there anyway to make the script behave like the one in iirb.exe? Thanks, Lewis -------------------------------------------------------------------------------- _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From llin at polypaths.com Wed Jul 20 10:49:00 2011 From: llin at polypaths.com (Lewis Lin) Date: Wed, 20 Jul 2011 10:49:00 -0400 Subject: [Ironruby-core] Access Top Level methods In-Reply-To: References: <4E0CD56A.5010203@polypaths.com> Message-ID: <4E26EADC.5050500@polypaths.com> Hi, Thanks for the reply. My main development version is on 1.1 for .NET 3.5. However, I did try it on 1.1.3 on .NET 4.0.30319.225 and still are able to reproduce the issue. I am running Windows XP 32bit environment. Is there any environment variables I should look into? Here is the screen copy I just did. As far as I understand, the global environment is actually a 'main' Object. The function defined in the global scope should be translated to private method of Object class which is what it shows in iirb.bat. Not sure why ir.exe as well as the ScriptEngine behaves differently. Thanks for your time! Lewis c:\Program Files\IronRuby 1.1\bin>ir IronRuby 1.1.3.0 on .NET 4.0.30319.225 Copyright (c) Microsoft Corporation. All rights reserved. >>> def global_hi ... puts 'hi' ... end => nil >>> class A ... def hi ... global_hi ... end ... end => nil >>> A.new.hi (ir):3:in `hi': undefined method `global_hi' for # (NoMethodError) from (ir):1 >>> self.method(:global_hi) => #>)#global_hi> >>> exit --------------------------------------------------------------------- c:\Program Files\IronRuby 1.1\bin>iirb irb(main):001:0> def global_hi irb(main):002:1> puts 'hi' irb(main):003:1> end => nil irb(main):004:0> class A irb(main):005:1> def hi irb(main):006:2> global_hi irb(main):007:2> end irb(main):008:1> end => nil irb(main):009:0> A.new.hi hi => nil irb(main):010:0> self.method(:global_hi) => # irb(main):011:0> On 7/20/2011 8:37 AM, Sickboy wrote: > I cannot reproduce this issue with IronRuby 1.1.3.0 on .NET 4.0.30319.235 > It works as expected: ir.exe result is same as irb result. > Regards > *From:* Lewis Lin > *Sent:* Thursday, June 30, 2011 9:58 PM > *To:* ironruby-core at rubyforge.org > *Subject:* [Ironruby-core] Access Top Level methods > Hi, > > I am trying to access top level method from the class definition in > IronRuby scripts. Example: > > def global_hi > end > > class A > def hi > global_hi > end > end > > A.new.hi > > The script executed in ScriptEngine throws a NoSuchMethodError. > I tried to ran the same code in iirb.exe It seems to behave the way I > expected. But when I tried it in ir.exe, it throws the exception as well. > I investigate a little more and found out > > irb(main):021:0> self.method(:global_hi) > => # > and > in ir.exe as well as script engine > >>> self.method(:xx) > => #>)#xx> > > Is there anyway to make the script behave like the one in iirb.exe? > > Thanks, > Lewis > > ------------------------------------------------------------------------ > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From orion.edwards at gmail.com Thu Jul 28 06:39:16 2011 From: orion.edwards at gmail.com (Orion Edwards) Date: Thu, 28 Jul 2011 22:39:16 +1200 Subject: [Ironruby-core] Lost messages Message-ID: <3C12D592-E78B-4E07-A574-B57EA665E7FB@gmail.com> Hi I sent a couple emails from my work account (my name at gallagher.co) enquiring about 2 patches I had submitted that seem to be in limbo. The first email was 2 months ago the second approx a week. Both these messages appear to have been dropped. Is the mailing list still alive? Is anyone caring about patches via github? Thanks, Orion From jschementi at gmail.com Thu Jul 28 09:11:36 2011 From: jschementi at gmail.com (Jimmy Schementi) Date: Thu, 28 Jul 2011 09:11:36 -0400 Subject: [Ironruby-core] Lost messages In-Reply-To: <3C12D592-E78B-4E07-A574-B57EA665E7FB@gmail.com> References: <3C12D592-E78B-4E07-A574-B57EA665E7FB@gmail.com> Message-ID: Orion, I sent you the email addresses you are subscribed with, so hopefully that clears up why some didn't make it to the list. I did see mail from that address about two months ago when you reported operator highlighting. Nothing two weeks ago. The throttling filesystem patch (https://github.com/IronLanguages/main/pull/20) wasn't merged in just due to me forgetting to test it out. The operator patch (https://github.com/IronLanguages/main/pull/21) was closed, but does not looked like it was merged in. Should both these still be merged in? ~Jimmy On Thu, Jul 28, 2011 at 6:39 AM, Orion Edwards wrote: > Hi > > I sent a couple emails from my work account (my name at gallagher.co) enquiring about 2 patches I had submitted that seem to be in limbo. The first email was 2 months ago the second approx a week. > > Both these messages appear to have been dropped. Is the mailing list still alive? Is anyone caring about patches via github? > > Thanks, Orion > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From orion.edwards at gmail.com Thu Jul 28 16:21:56 2011 From: orion.edwards at gmail.com (Orion Edwards) Date: Fri, 29 Jul 2011 08:21:56 +1200 Subject: [Ironruby-core] Lost messages In-Reply-To: References: <3C12D592-E78B-4E07-A574-B57EA665E7FB@gmail.com> Message-ID: Ahhh, thank you. Our company marketing department arbitrarily decided to change everyone's email address from .co.nz to just .co, so it'll be the wrong address. I'll re-sign up my work account at the new address. The throttling filesystem patch is (IMHO) definitely useful The operator one is too, but I wasn't sure if the rest of the community would accept the change to using "Script Operator", as it is a bit odd. I was hoping someone would know more about VS and point out how to fix it properly. If not, then if you guys are happy to accept it, I'm happy. I think I closed the second pull request by accident. Github look like it merged both the pull requests into a single one, and I didn't want it to do that. I'm a bit of a github newbie, sorry On Fri, Jul 29, 2011 at 1:11 AM, Jimmy Schementi wrote: > Orion, > > I sent you the email addresses you are subscribed with, so hopefully > that clears up why some didn't make it to the list. I did see mail > from that address about two months ago when you reported operator > highlighting. Nothing two weeks ago. > > The throttling filesystem patch > (https://github.com/IronLanguages/main/pull/20) wasn't merged in just > due to me forgetting to test it out. The operator patch > (https://github.com/IronLanguages/main/pull/21) was closed, but does > not looked like it was merged in. Should both these still be merged > in? > > ~Jimmy > > > > On Thu, Jul 28, 2011 at 6:39 AM, Orion Edwards > wrote: > > Hi > > > > I sent a couple emails from my work account (my name at gallagher.co) > enquiring about 2 patches I had submitted that seem to be in limbo. The > first email was 2 months ago the second approx a week. > > > > Both these messages appear to have been dropped. Is the mailing list > still alive? Is anyone caring about patches via github? > > > > Thanks, Orion > > > > > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: