Re: [Ironruby-core] Overriding CLS Virtuals

2008-10-26 Thread Ted Milker
On Sun, Oct 26, 2008 at 12:20 AM, Curt Hagenlocher [EMAIL PROTECTED] wrote: However, virtual calls from a C# application back into IronRuby are a different matter, due Ruby's dynamic nature. Here there is both a performance cost and a semantic cost for performing multiple lookups. The

Re: [Ironruby-core] Overriding CLS Virtuals

2008-10-26 Thread Jim Deville
The parenthesis do give an important clue, and luckily they are required for calling a method with a constant identifier. As far as idioms and conventions go, I don't know how much of an official convention (as much as a Ruby convention is official) there is, but the few cases of capitalized

Re: [Ironruby-core] Overriding CLS Virtuals

2008-10-26 Thread Jay McGaffigan
With respect to conventions the dynamic languages are the first languages that I've used that can actually depend on the casing (and pluralization) to work right (think active record models). Now it's no longer part of the readability factor of code but it can play an important part in how a DSL

Re: [Ironruby-core] Unicode Source Files

2008-10-26 Thread Curt Hagenlocher
We do this for compatibility with Ruby 1.8.6, though as you can see, we don't have the error message quite right: PS F:\ C:\ruby\bin\ruby.exe x.rb x.rb:1: Invalid char `\377' in expression x.rb:1: Invalid char `\376' in expression :) I believe you'll need to save as UTF-8 and then manually

Re: [Ironruby-core] Unicode Source Files

2008-10-26 Thread Ted Milker
Here is the extension method I am using if anyone else is interested: public static object ExecuteUnicodeFile( this ScriptRuntime rt, string filename ) { string rbCode; // OpenText will strip the BOM and keep the Unicode intact using( var rdr = File.OpenText( filename ) ) {

Re: [Ironruby-core] Unicode Source Files

2008-10-26 Thread Curt Hagenlocher
If you save in Western European (Windows) - Codepage 1252 from within Visual Studio, you'll get the right result -- as long as you're not using any characters with a codepoint greater than 127. And if you are, you're probably better off anyway expressing this code point as an explicit set of

Re: [Ironruby-core] Unicode Source Files

2008-10-26 Thread Tomas Matousek
You can switch to 1.9 compat mode by passing -19 argument on command line. Tomas -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ted Milker Sent: Sunday, October 26, 2008 1:57 PM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Unicode Source