[#8484] strptime fails to properly parse certain inputs — <noreply@...>

Bugs item #5263, was opened at 2006-08-01 23:14

13 messages 2006/08/02
[#8485] Re: [ ruby-Bugs-5263 ] strptime fails to properly parse certain inputs — Yukihiro Matsumoto <matz@...> 2006/08/02

Hi,

[#8538] Re: [ ruby-Bugs-5263 ] strptime fails to properly parse certain inputs — nobu@... 2006/08/06

Hi,

[#8561] sandbox timers & block scopes — why the lucky stiff <ruby-core@...>

Two puzzles I am trying to solve:

28 messages 2006/08/08
[#8624] Re: sandbox timers & block scopes — why the lucky stiff <ruby-core@...> 2006/08/15

raise ThisDecayingInquisition, "anyone? anyone at all?"

[#8627] Re: sandbox timers & block scopes — MenTaLguY <mental@...> 2006/08/15

On Wed, 2006-08-16 at 00:35 +0900, why the lucky stiff wrote:

[#8628] Re: sandbox timers & block scopes — why the lucky stiff <ruby-core@...> 2006/08/15

On Wed, Aug 16, 2006 at 02:46:30AM +0900, MenTaLguY wrote:

[#8629] Re: sandbox timers & block scopes — "Charles O Nutter" <headius@...> 2006/08/15

On 8/15/06, why the lucky stiff <ruby-core@whytheluckystiff.net> wrote:

[#8690] a ruby-core primer — why the lucky stiff <ruby-core@...>

Hello, all. I've been working on the ruby-core page for the new Ruby site.

21 messages 2006/08/22

Re: [Q] How would you do method extensions (sometimes called class extensions) in Ruby?

From: Markus Gaelli <gaelli@...>
Date: 2006-08-31 23:05:22 UTC
List: ruby-core #8766
Sam and Nicolas,

thanks for your fast answers and pointers.
Guess I have to subscribe to another list - which is a good thing!
- Just wanted to be sure... ;-)
(I therefore forward another mail which just happened to arrive in  
this moment in my squeak mailbox)

On Aug 31, 2006, at 11:44 PM, Sam Roberts wrote:

> On Fri, Sep 01, 2006 at 06:08:11AM +0900, Markus Gaelli wrote:
>> I am aware of Singleton Methods, but as they can extend instances,
>> (how) can I extend classes without changing their original class
>> definition in Ruby?
>
> This is probably best posted to ruby-talk, not ruby-core, folks would
> likely be quite interested.
>
> classes are "open" in ruby, you can add methods as you wish.
>
> irb(main):001:0> s = "hi"
> => "hi"
> irb(main):002:0> class String; def this(opt) puts(self+opt) end end
> => nil
> irb(main):003:0> s.this(" that")
> hi that
> => nil
> irb(main):004:0> "bye".this(" that")
> bye that
> => nil
>

I was reading (skimming) the Ruby book of Thomas and Hunt but could  
not find this. Thanks a lot!
I appreciate Ruby to be able to extend any class with any methods.

Cheers,

Markus

p.s. Funny that you have "reply" set to the person who answered and  
not to the list, different than in Squeak and Squeakland...

In This Thread

Prev Next