On Thu, Oct 30, 2008 at 10:12 AM, Curt Hagenlocher <[EMAIL PROTECTED]> wrote:
> Finally, we're shortly going to change the naming policy for overrides of CLS
> virtual methods. When this happens, you'll need to define
> ProcedureEnumerator with the "rubified" method names: move_next, reset and
Cool. Now you can provide an answer when the next person asks. :)
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Peters
Sent: Thursday, October 30, 2008 6:40 PM
To: ironruby-core@rubyforge.org
Subject: Re: [Ironruby-core] Another Interop Question
No worries, I've found what I need in Phil Haack's IronRuby view engine sample.
Cheers,
Andrew.
On Fri, Oct 31, 2008 at 12:25 AM, Andrew Peters <[EMAIL PROTECTED]> wrote:
> From C#, is it possible to new up an instance of an IronRuby class and
> then invoke a method on it?
>
> I.e:
>
> var ruby
Do you know that your script is being loaded at all? How are you integrating
with the extension model (which no doubt expects an assembly)?
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Maurits Rijk
Sent: Thursday, October 30, 2008 8:50 AM
To: ironruby
Looks good.
-Original Message-
From: Tomas Matousek
Sent: Wednesday, October 29, 2008 2:11 PM
To: IronRuby External Code Reviewers
Cc: ironruby-core@rubyforge.org
Subject: Code Review: LexicalScopes2
tfpt review "/shelveset:LexicalScopes2;REDMOND\tomat"
The actual shelveset :)
Refacto
Hi Curt,
Curt Hagenlocher wrote:
> "yield" doesn't do in Ruby what it does in C#.
Ah, I wasn't aware of that.
> You'll probably need to define your own enumerator class doing something
> like this:
> def ListProcedure
> ProcedureEnumerator.new(Procedure.new(...))
>end
For some weird reason m
"yield" doesn't do in Ruby what it does in C#.
You'll probably need to define your own enumerator class doing something like
this:
class ProcedureEnumerator
include System::Collections::Generic::IEnumerator.of(Procedure)
def initialize *proc_list
@proc_list = proc_list
@pos = 0
en
Nice, the array conversion seems to work quite well. Right now I'm
encountering the next problem. The Plugin base class (C#) has the follow
signature:
protected abstract IEnumerator ListProcedures();
How can I implement this in my IronRuby derived class? Of course I tried
something like:
def
FWIW I've used this helper method:
class Array
def to_clr_arr
arr = System::Array.CreateInstance self[0].class.to_clr_type,
self.length.to_clr_int
self.each_with_index { |r, i| arr[i] = r }
return arr
end
end
Here's the to_clr_int method:
class Object
def to_
>From C#, is it possible to new up an instance of an IronRuby class and
then invoke a method on it?
I.e:
var ruby = new StringBuilder();
ruby.AppendLine("class MyClass");
ruby.AppendLine(" def render");
ruby.AppendLine("\"Hello!\"");
ruby.AppendLine(" end");
ruby.AppendLine("end");
var sc
Thanks!
I'm still a bit surprised that one has to do the conversion explicitly.
I would expect that either IronRuby uses CLR arrays (and strings) or
would do the conversion implicitly for me. But as I said in my previous
mail, I'm new to IronRuby and probably missing a whole bunch of design
de
This should work:
tag Action.new { puts 'foo' }
Tomas
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Peters
Sent: Thursday, October 30, 2008 12:00 AM
To: ironruby-core@rubyforge.org
Subject: [Ironruby-core] Passing block to CLS method via Action
Will this ever be supported?
// c#
public void Tag(Action action)
{
action();
}
// rb
tag do
puts 'yay!'
end
Cheers,
Andrew.
___
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core
13 matches
Mail list logo