[Ironruby-core] Comparing CLR strings and Ruby strings - a slightly surprising behaviour
meinrad.recheis at gmail.com
Thu Mar 5 17:37:14 EST 2009
Back ticks have a different meaning in ruby. They denote code to be executed
on the system shell.
On Thu, Mar 5, 2009 at 10:21 PM, Pete Bacon Darwin <
bacondarwin at googlemail.com> wrote:
> How about back ticks? `Some string`?
> Since ruby can have single quote string literals it might not be that
> obvious that 'Some string' it is not a normal Ruby string.
> -----Original Message-----
> From: ironruby-core-bounces at rubyforge.org
> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek
> Sent: Thursday,05 March 05, 2009 21:03
> To: ironruby-core at rubyforge.org
> Subject: Re: [Ironruby-core] Comparing CLR strings and Ruby strings - a
> slightly surprising behaviour
> I'm going to use single quotes for formatting CLR strings via inspect.
> "clr:" prefix is too long and it gets in your way when working mostly with
> CLR strings.
> >>> "Some string"
> => "Some string"
> >>> "Some string".to_clr_string
> => 'Some string'
> Sounds good?
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironruby-core