[#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:01849] Re: Minor irritation, can't figure out how to patch it though!

From: matz@... (Yukihiro Matsumoto)
Date: 2000-03-15 17:37:22 UTC
List: ruby-talk #1849
Hi,

In message "[ruby-talk:01844] Minor irritation, can't figure out how to patch it though!"
    on 00/03/15, 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.

Hmm, Ruby may be too Americanized. :-)

|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.
|
|Sorry if this suggestion annoys the neighbo(u)rs,

How about the following (just for an idea):

  # the module for your script
  module BritishInitialise      # there should be better name.
    def initialize(*args)
      initialise(*args) if defined? initialise
    end
  end

Usage:

  class Foo
    include BritishInitialise
    def initialise(a)
      p a
    end
  end

  foo = Foo.new(5)

							matz.

In This Thread