Re: [Ironruby-core] IronRuby hosting: self becomes nil

2009-01-10 Thread Alex 2k8
Submitted as Bug # 23512. http://rubyforge.org/tracker/index.php?func=detail&aid=23512&group_id=4359&atid=16798 BTW, Tomas, thank you for your responses! - Alex -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rub

Re: [Ironruby-core] IronRuby hosting: self becomes nil

2009-01-09 Thread Alex 2k8
Hello, Should I report this as IronRuby bug? - Alex -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

Re: [Ironruby-core] Misleading error message calling private method

2009-01-09 Thread Alex 2k8
Hi, Tomas I submitted it as bug # 23508, thought did no assignments. - Alex -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

Re: [Ironruby-core] Calling overloaded methods

2009-01-09 Thread Alex 2k8
Thank you! -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

[Ironruby-core] Calling overloaded methods

2009-01-09 Thread Alex 2k8
Hello, C# public class Cls { public void foo(object a) { Console.WriteLine("foo #1"); } public void foo(object[] a) { Console.WriteLine("foo #2"); } } Ruby: Cls.new.foo(7) Cls.new.foo([3, 4]) Output: foo #1 foo #1

[Ironruby-core] Misleading error message calling private method

2009-01-09 Thread Alex 2k8
Hello, IronRuby throws misleading error message, when I call private method of the C# class. - - - - C# public class Cls { private void private_method() {} } Ruby: Cls.new.private_method Output: # - - - - - Alex. -- Posted via http://www.ruby-forum.com/. __

Re: [Ironruby-core] local variables: Ruby vs. IronRuby difference?

2009-01-09 Thread Alex 2k8
Thanks, http://www.ruby-forum.com/topic/175284 fixed it. -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core

[Ironruby-core] IronRuby hosting: self becomes nil

2009-01-08 Thread Alex 2k8
Hello, I get very odd results with attached code: - - - # nil # - - - While was expected - - - # # # - - - 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 b

[Ironruby-core] local variables: Ruby vs. IronRuby difference?

2009-01-08 Thread Alex 2k8
Hello, Ruby: irb(main):001:0> foo = 3 => 3 irb(main):002:0> foo => 3 IronRuby: >>> foo = 3 => 3 >>> foo :0: undefined method `foo' for main:Object (NoMethodError) Any idea, why this error thrown by IronRuby? - Alex -- Posted via http://www.ruby-forum.com/. _

Re: [Ironruby-core] Problem calling CLR method

2009-01-08 Thread Alex 2k8
Btw, IronPython can call same method: http://farnet.googlecode.com/files/IronPythonFar.1.0.35.rar IronPythonFar\Scripts\calc.py - - - far.RegisterTool(ipy, "IronPython calculator", calc, FarManager.ToolOptions.F11Menus) - - - -- Posted via http://www.ruby-forum.com/. __

Re: [Ironruby-core] Problem calling CLR method

2009-01-08 Thread Alex 2k8
> Could you sent source code for FarNet class (RegisterTool method > declaration)? http://code.google.com/p/farnet/source/browse/trunk/FarNet/FarNetIntf/Far.cs http://code.google.com/p/farnet/source/browse/trunk/FarNet/FarNetPlugin/Far.h http://code.google.com/p/farnet/source/browse/trunk/FarNet/

Re: [Ironruby-core] Problem calling explicit interface methods

2009-01-08 Thread Alex 2k8
Curious, how it is expected to work (or nobody thinked it over yet?) Example to consider: - - - - public interface IFoo1 { void Bar(); } public interface IFoo2 { void Bar(); } public class Cls : IFoo1, IFoo2 { void IFoo1.Bar() {}

[Ironruby-core] Problem calling explicit interface methods

2009-01-08 Thread Alex 2k8
Hello, I am trying to call explicitly implemented interface method, but get such error undefined method `bar' for # C# code: public interface IFoo { void Bar(); } public class Cls : IFoo { void IFoo.Bar() { } } Ruby code: x = App::Cls.new x.bar

[Ironruby-core] Problem calling CLR method

2009-01-07 Thread Alex 2k8
Hello, I can't call the object's method, thought it exists. My ruby script: - - - - - # Let's dump .Net methods far.get_type.get_methods.each { |m| p m.name } # Try to call 'RegisterTool' method begin far.register_tool rescue => err p err end begin far.RegisterTool rescue => err p err

[Ironruby-core] Enumerate CLR methods

2009-01-07 Thread Alex 2k8
Hello, How to enumerate the CLR object methods? I whould like to write some thing like this: - - - require 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' include System::Windows::Forms p Form.new.methods.sort - - - and to see methods like: sh