[#3986] Re: Principle of least effort -- another Ruby virtue. — Andrew Hunt <andy@...>

> Principle of Least Effort.

14 messages 2000/07/14

[#4043] What are you using Ruby for? — Dave Thomas <Dave@...>

16 messages 2000/07/16

[#4139] Facilitating Ruby self-propagation with the rig-it autopolymorph application. — Conrad Schneiker <schneik@...>

Hi,

11 messages 2000/07/20

[ruby-talk:03794] Re: Array.uniq! returning nil

From: "NAKAMURA, Hiroshi" <nahi@...>
Date: 2000-07-04 03:51:43 UTC
List: ruby-talk #3794
Hi, Aleksi,

> From: Aleksi Niemel
> Sent: Tuesday, July 04, 2000 9:20 AM

> So I guess there's probably good reason why it can return nil. If there is
> none, maybe this is a feature which should be changed in 1.6 (or in future).

As matz said in [ruby-talk:3785] and Dave said in [ruby-talk:1229],
I often want to check if modification is done.

If bang methods does not returns nil, I have to write;

  if target.sub!( src, dest ) != target
    p 'modified'
  end

or

  if target.sub!( src, dest ) && $~
    p 'modified'
  end

It bothers me...

// NaHi

In This Thread

Prev Next