Re: [Ironruby-core] undefined Method 'downcase'

2009-03-19 Thread Marco Kotrotsos
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

Re: [Ironruby-core] undefined Method 'downcase'

2009-03-19 Thread Curt Hagenlocher
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

Re: [Ironruby-core] undefined Method 'downcase'

2009-03-19 Thread Marco Kotrotsos
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

Re: [Ironruby-core] undefined Method 'downcase'

2009-03-19 Thread Marco Kotrotsos
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 >

Re: [Ironruby-core] undefined Method 'downcase'

2009-03-19 Thread Marco Kotrotsos
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 >

Re: [Ironruby-core] undefined Method 'downcase'

2009-03-18 Thread Ivan Porto Carrero
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,