returnvalue = engine.Operations.InvokeMember(instance, method,
arg).ToString();
whereas arg is always String at the moment. (will change somewhere in
the future)
I can probably do a type check on arg...
Marco
Curt Hagenlocher wrote:
> Out of curiosity, why are you passing a string to this
Marco Kotrotsos
Sent: Thursday, March 19, 2009 9:40 AM
To: ironruby-core@rubyforge.org
Subject: Re: [Ironruby-core] undefined Method 'downcase'
ugh (slap head)
it was
n = arg.to_s.to_i
so nasty...:)
Marco
Marco Kotrotsos wrote:
> i'm sorry, another one popped up and I hope you c
i'm sorry, another one popped up and I hope you can help me with it
it's with this example
class Plotlight
def fib n
if n<2
n
else
res = fib(n-2)+fib(n-1)
end
end
end
when executing, I get Object must be of type String. I suspect this to
be because I am feeding it a
ugh (slap head)
it was
n = arg.to_s.to_i
so nasty...:)
Marco
Marco Kotrotsos wrote:
> i'm sorry, another one popped up and I hope you can help me with it
>
> it's with this example
>
> class Plotlight
> def fib n
> if n<2
> n
> else
> res = fib(n-2)+fib(n-1)
> end
>
Thank you Ivan, that has been most helpful!
Marco
Ivan Porto carrero wrote:
> A CLR string is not the same as a ruby string. Calling .to_s before
> downcase
> should work or you can monkey patch System::String and add the method
> downcase to the clr string class if it bothers you too much
>
A CLR string is not the same as a ruby string. Calling .to_s before downcase
should work or you can monkey patch System::String and add the method
downcase to the clr string class if it bothers you too much
class System::String
def downcase
self.to_s.downcase
end
end
On Wed, Mar 18,