[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:01847] Re: Minor irritation, can't figure out how to patch it though!

From: Dave Thomas <Dave@...>
Date: 2000-03-15 17:43:54 UTC
List: ruby-talk #1847
Hugh Sasse Staff Elec Eng <hgs@dmu.ac.uk> writes:

> I was considering how difficult it would be to patch Ruby to accept
> British spellings for things like initialize.  I am forever typing
> initialise, and wonder if it would break very much code if both forms were
> permitted?  I cannot see where this is defined, there seems to be no lex
> file that I can see that I can patch.  I'm not sure how much of the world
> actually uses our form of English, so I don't know how many takers there
> would be for such an addition.

You could write it as a library module which you include:

     module British
       def initialize(*a)
         initialise(*a)
       end
     end


     class Fred
       include British

       def initialise(str)
         printf "Initializing #{str}\n"
         @str = str
       end
     end

     f = Fred.new("Hello")

> Sorry if this suggestion annoys the neighbo(u)rs,

I just checked in my Oxford English Dictionary (Compact edition - the
one you need a magnifying glass to read). It favours 'initialize' with
a 'z'. I seem to remember Fowler says the same. It might be an
interesting project to look through some authoritative references - I
_think_ this is a case where the academics disagree with popular
spelling.


Regards

Dave

In This Thread