Correction: Methods are first-class, they just can't be invoked from their
objects with ().
JD
-Original Message-
From: Tomas Matousek <[EMAIL PROTECTED]>
Sent: November 15, 2008 6:11 PM
To: ironruby-core@rubyforge.org
Subject: Re: [Ironruby-core] ScriptScope.SetVariable - pass in a fun
Try my_function.invoke('hello!'). Ruby doesn't have first class methods.
For convenience we can monkey-patch Delegate to mimic procs (add [], call
methods).
Tomas
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Benjamin van der
Veen
Sent: Saturday, Nove
Hi,
I'd like do something like this:
public void AddFunction() {
aScriptScope.SetVariable("my_function", (Action)MyFunction);
}
public void MyFunction(string value) {
// do stuff!
}
Currently if I execute a script like "my_function 'hello!'" or
"my_function('hello!')" I get:
ArgumentEx
Tomas Matousek wrote:
> Isn't the class internal? (We should improve error reporting related to
> visibility)
> Try to make it public. Public fields should be accessible in the same
> way properties are.
>
> Tomas
Yep, that was the problem. Declared it public and it works now.
Thanks,
benjamin
Isn't the class internal? (We should improve error reporting related to
visibility)
Try to make it public. Public fields should be accessible in the same way
properties are.
Tomas
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Benjamin van der
Veen
Se
We'll have both types of interactive tests eventually.
-Original Message-
From: Michael Letterle <[EMAIL PROTECTED]>
Sent: November 15, 2008 2:55 PM
To: ironruby-core@rubyforge.org
Subject: Re: [Ironruby-core] Executables
If people are going to be using irb, you might ;)
Anyway, I sup
If people are going to be using irb, you might ;)
Anyway, I suppose that makes sense
On Sat, Nov 15, 2008 at 5:44 PM, Curt Hagenlocher <[EMAIL PROTECTED]>wrote:
> We don't want our interop tests to be testing irb.rb though. :)
>
>
>
> *From:* [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] *On B
We don't want our interop tests to be testing irb.rb though. :)
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Letterle
Sent: Friday, November 14, 2008 6:18 PM
To: ironruby-core@rubyforge.org
Subject: Re: [Ironruby-core] Executables
? interop works through IRB just as well
Hello Andrew,
Andrew Peters wrote:
> I think this is because you need to reference the IronRuby.Libraries
> dll.
> Strange error I know.
>
> On Sat, Nov 15, 2008 at 7:33 PM, Benjamin Van der veen
> <[EMAIL PROTECTED]
Ah, yes, this fixed the stack overflow error. Strange indeed—thanks for
the