[#114484] Secret Santas (#2) — Ruby Quiz <james@...>

The three rules of Ruby Quiz:

56 messages 2004/10/01
[#114675] Secret Santas (#2) — Robo <robo@...> 2004/10/03

I'm still new to Ruby, but giving this a crack anyway.

[#114496] Community size — Dave Thomas <dave@...>

Folks:

15 messages 2004/10/01

[#114646] Kernel#eval taking a block — "trans. (T. Onoma)" <transami@...>

Is there a reason Kernel#eval won't take a block? I wrote this to overcome:

14 messages 2004/10/03
[#114729] Re: Kernel#eval taking a block — nobu.nokada@... 2004/10/04

Hi,

[#114654] Feature Request: Truly Indented Here-Docs — James Edward Gray II <james@...>

Ruby's here-doc syntax baffles me. I don't get the indent the end tag

11 messages 2004/10/03

[#114708] Thinking about Threaded IO — James Edward Gray II <james@...>

I've not used Ruby's threads before, so I have what will probably be

13 messages 2004/10/03

[#114824] A ruby course — Brian Schrer <ruby@...>

Hello List,

42 messages 2004/10/04
[#115001] Re: A ruby course — Gavin Sinclair <gsinclair@...> 2004/10/05

On Tuesday, October 5, 2004, 3:17:47 AM, Brian wrote:

[#115042] Re: A ruby course — Brian Schrer <ruby@...> 2004/10/05

Hello Group,

[#114890] New [] Semantics — Bill Atkins <batkins57@...>

Currently, the following code

97 messages 2004/10/04
[#114910] Re: [RCR] New [] Semantics — Charles Comstock <cc1@...> 2004/10/05

Bill Atkins wrote:

[#114925] Re: [RCR] New [] Semantics — "trans. (T. Onoma)" <transami@...> 2004/10/05

On Monday 04 October 2004 09:09 pm, Charles Comstock wrote:

[#114938] Re: [RCR] New [] Semantics — Markus <markus@...> 2004/10/05

The ideas I'm (slowly) playing with for ranges:

[#114959] Re: [RCR] New [] Semantics — "trans. (T. Onoma)" <transami@...> 2004/10/05

On Tuesday 05 October 2004 01:25 am, Markus wrote:

[#115120] Range behavior (Re: [RCR] New [] Semantics) — Yukihiro Matsumoto <matz@...> 2004/10/06

Hi,

[#115128] Re: Range behavior (Re: [RCR] New [] Semantics) — "trans. (T. Onoma)" <transami@...> 2004/10/06

On Tuesday 05 October 2004 08:19 pm, Yukihiro Matsumoto wrote:

[#115159] Re: Range behavior (Re: [RCR] New [] Semantics) — Brian Candler <B.Candler@...> 2004/10/06

On Wed, Oct 06, 2004 at 11:18:50AM +0900, trans. (T. Onoma) wrote:

[#115196] Re: Range behavior (Re: [RCR] New [] Semantics) — "trans. (T. Onoma)" <transami@...> 2004/10/06

On Wednesday 06 October 2004 05:15 am, Brian Candler wrote:

[#115345] Re: Range behavior (Re: [RCR] New [] Semantics) — Martin DeMello <martindemello@...> 2004/10/07

Yukihiro Matsumoto <matz@ruby-lang.org> wrote:

[#115404] Re: Range behavior (Re: [RCR] New [] Semantics) — "trans. (T. Onoma)" <transami@...> 2004/10/07

matz wrote:

[#115413] Re: Range behavior (Re: [RCR] New [] Semantics) — Brian Candler <B.Candler@...> 2004/10/07

On Thu, Oct 07, 2004 at 11:11:11PM +0900, trans. (T. Onoma) wrote:

[#115424] Re: Range behavior (Re: [RCR] New [] Semantics) — "trans. (T. Onoma)" <transami@...> 2004/10/07

Brian, you make some excellent points, and clarify the issues. Thanks.

[#115514] Re: Range behavior (Re: [RCR] New [] Semantics) — Yukihiro Matsumoto <matz@...> 2004/10/08

Hi,

[#115527] Re: Range behavior (Re: [RCR] New [] Semantics) — "trans. (T. Onoma)" <transami@...> 2004/10/08

On Thursday 07 October 2004 08:08 pm, Yukihiro Matsumoto wrote:

[#115543] Re: Range behavior (Re: [RCR] New [] Semantics) — Yukihiro Matsumoto <matz@...> 2004/10/08

Hi,

[#115553] Re: Range behavior (Re: [RCR] New [] Semantics) — "trans. (T. Onoma)" <transami@...> 2004/10/08

On Thursday 07 October 2004 11:42 pm, Yukihiro Matsumoto wrote:

[#115569] Re: Range behavior (Re: [RCR] New [] Semantics) — Yukihiro Matsumoto <matz@...> 2004/10/08

Hi,

[#115626] Re: Range behavior (Re: [RCR] New [] Semantics) — "trans. (T. Onoma)" <transami@...> 2004/10/08

On Friday 08 October 2004 04:31 am, Yukihiro Matsumoto wrote:

[#115800] Re: Range behavior (Re: [RCR] New [] Semantics) — Yukihiro Matsumoto <matz@...> 2004/10/09

Hi,

[#115802] Re: Range behavior (Re: [RCR] New [] Semantics) — "Randy W. Sims" <ml-ruby@...> 2004/10/09

On 10/9/2004 4:28 AM, Yukihiro Matsumoto wrote:

[#115807] Re: Range behavior (Re: [RCR] New [] Semantics) — Yukihiro Matsumoto <matz@...> 2004/10/09

Hi,

[#115809] Re: Range behavior (Re: [RCR] New [] Semantics) — "Randy W. Sims" <ml-ruby@...> 2004/10/09

On 10/9/2004 5:08 AM, Yukihiro Matsumoto wrote:

[#115811] Re: Range behavior (Re: [RCR] New [] Semantics) — Yukihiro Matsumoto <matz@...> 2004/10/09

Hi,

[#115814] Re: Range behavior (Re: [RCR] New [] Semantics) — "Randy W. Sims" <ml-ruby@...> 2004/10/09

On 10/9/2004 5:33 AM, Yukihiro Matsumoto wrote:

[#115817] Re: Range behavior (Re: [RCR] New [] Semantics) — gabriele renzi <rff_rff@...> 2004/10/09

Randy W. Sims ha scritto:

[#115820] Re: Range behavior (Re: [RCR] New [] Semantics) — Brian Candler <B.Candler@...> 2004/10/09

On Sat, Oct 09, 2004 at 08:14:42PM +0900, gabriele renzi wrote:

[#114892] RubyGems and RPA — James Edward Gray II <james@...>

Having just read the RubyGems chapter in the Pickaxe II, I'm curious

31 messages 2004/10/04
[#114895] Re: RubyGems and RPA — Bill Atkins <batkins57@...> 2004/10/04

RPA and RubyGems both solve the same problem (automatic installation

[#114977] Re: RubyGems and RPA — Eivind Eklund <eeklund@...> 2004/10/05

Association disclaimer: I'm the original architect of the RPA vision

[#115194] Re: RubyGems and RPA — Chad Fowler <chadfowler@...> 2004/10/06

On Tue, 5 Oct 2004 20:09:10 +0900, Eivind Eklund <eeklund@gmail.com> wrote:

[#115224] Re: RubyGems and RPA — Eivind Eklund <eeklund@...> 2004/10/06

On Wed, 6 Oct 2004 22:48:07 +0900, Chad Fowler <chadfowler@gmail.com> wrote:

[#115251] Re: RubyGems and RPA — Richard Kilmer <rich@...> 2004/10/06

[#115260] Re: RubyGems and RPA — Austin Ziegler <halostatue@...> 2004/10/06

On Thu, 7 Oct 2004 03:00:45 +0900, Richard Kilmer <rich@infoether.com> wrote:

[#114924] Regexp match question on interpolated strings... — Richard Kilmer <rich@...>

If I had the source for a string:

13 messages 2004/10/05

[#114927] Ruby-esque Inversion of Control — Jamis Buck <jgb3@...>

First, let me just say THANK-YOU to everyone who gave me feedback on my

13 messages 2004/10/05
[#115046] Re: Ruby-esque Inversion of Control — Paul Brannan <pbrannan@...> 2004/10/05

I still don't think that Copland is in any way useful to me (I just

[#115095] Large disc-based "hash"? — Robert Feldt <feldt@...>

Hi,

13 messages 2004/10/05

[#115195] quality of error messages — Joachim Wuttke <Joachim_Wuttke@...>

Hi Ruby developers,

101 messages 2004/10/06
[#115200] Re: quality of error messages — Brian Candler <B.Candler@...> 2004/10/06

On Wed, Oct 06, 2004 at 10:48:49PM +0900, Joachim Wuttke wrote:

[#115207] Re: quality of error messages — Joachim Wuttke <Joachim_Wuttke@...> 2004/10/06

Encouraged by your quick response, I try to explain better

[#115212] Re: quality of error messages — Gavin Sinclair <gsinclair@...> 2004/10/06

On Thursday, October 7, 2004, 12:49:33 AM, Joachim wrote:

[#115264] Re: quality of error messages — Charles Hixson <charleshixsn@...> 2004/10/06

Gavin Sinclair wrote:

[#115268] Re: quality of error messages — Brian Candler <B.Candler@...> 2004/10/06

On Thu, Oct 07, 2004 at 04:30:38AM +0900, Charles Hixson wrote:

[#115286] Re: quality of error messages — Joachim Wuttke <Joachim_Wuttke@...> 2004/10/06

Thank you, Brian.

[#115289] Re: quality of error messages — Markus <markus@...> 2004/10/06

On Wed, 2004-10-06 at 15:19, Joachim Wuttke wrote:

[#115493] Re: quality of error messages — Austin Ziegler <halostatue@...> 2004/10/07

On Thu, 7 Oct 2004 07:39:04 +0900, Markus <markus@reality.com> wrote:

[#115513] Re: quality of error messages — markus@... 2004/10/07

On Fri, 8 Oct 2004, Austin Ziegler wrote:

[#115460] Re: quality of error messages — Mark Hubbart <discordantus@...> 2004/10/07

On Thu, 7 Oct 2004 07:39:04 +0900, Markus <markus@reality.com> wrote:

[#115484] Re: quality of error messages — Brian Schrer <ruby@...> 2004/10/07

Mark Hubbart wrote:

[#115511] Re: quality of error messages — Yukihiro Matsumoto <matz@...> 2004/10/07

Hi,

[#115596] Re: quality of error messages — Brian Candler <B.Candler@...> 2004/10/08

On Fri, Oct 08, 2004 at 08:06:27AM +0900, Yukihiro Matsumoto wrote:

[#116200] Re: quality of error messages — Austin Ziegler <halostatue@...> 2004/10/11

On Fri, 8 Oct 2004 20:26:55 +0900, Brian Candler <b.candler@pobox.com> wrote:

[#116211] Re: quality of error messages — Hal Fulton <hal9000@...> 2004/10/12

Austin Ziegler wrote:

[#116215] Ruby Directions (was Re: quality of error messages) — Austin Ziegler <halostatue@...> 2004/10/12

On Tue, 12 Oct 2004 09:21:16 +0900, Hal Fulton <hal9000@hypermetrics.com> wrote:

[#116256] Re: Ruby Directions (was Re: quality of error messages) — "Robert Klemme" <bob.news@...> 2004/10/12

[#116299] Re: Ruby Directions (was Re: quality of error messages) — Gavin Sinclair <gsinclair@...> 2004/10/12

On Tuesday, October 12, 2004, 5:09:37 PM, Robert wrote:

[#116216] Re: Ruby Directions (was Re: quality of error messages) — "David A. Black" <dblack@...> 2004/10/12

Hi --

[#115285] Bit of the Matz Interview (in Rubyist Magazine) — <ume@...>

I haven't translated it all yet (it's quite long to translate, and I'm just

38 messages 2004/10/06
[#115293] Re: Bit of the Matz Interview (in Rubyist Magazine) — Jamis Buck <jgb3@...> 2004/10/06

ume@lightsider.com wrote:

[#115299] Re: Bit of the Matz Interview (in Rubyist Magazine) — Yukihiro Matsumoto <matz@...> 2004/10/06

Hi,

[#115301] Re: Bit of the Matz Interview (in Rubyist Magazine) — Chad Fowler <chadfowler@...> 2004/10/06

On Thu, 7 Oct 2004 08:27:08 +0900, Yukihiro Matsumoto

[#115360] ndb Object-Relational Mapper — "George Moschovitis" <george.moschovitis@...>

= n/db README

25 messages 2004/10/07
[#115368] Re: [ANN] ndb Object-Relational Mapper — Brian Candler <B.Candler@...> 2004/10/07

On Thu, Oct 07, 2004 at 08:14:53PM +0900, George Moschovitis wrote:

[#115407] Re: [ANN] ndb Object-Relational Mapper — "Kirk Haines" <khaines@...> 2004/10/07

On Thu, 7 Oct 2004 21:20:37 +0900, Brian Candler wrote

[#115430] Re: [ANN] ndb Object-Relational Mapper — Brian Candler <B.Candler@...> 2004/10/07

On Thu, Oct 07, 2004 at 11:31:37PM +0900, Kirk Haines wrote:

[#115583] Re: [ANN] ndb Object-Relational Mapper — George Moschovitis <gm@...> 2004/10/08

> I wrote a system once which incorporated this concept, but since it had a

[#115427] Sth. wrong with File.file? (or with me) — Michael Weller <michael@...>

Hi!

114 messages 2004/10/07
[#115435] Re: Sth. wrong with File.file? (or with me) — Mohammad Khan <mkhan@...> 2004/10/07

On Thu, 2004-10-07 at 12:30, Michael Weller wrote:

[#118265] true? & false? — Mohammad Khan <mkhan@...> 2004/10/29

Wouldn't it be nice to have two more methods true? and false? like nil?

[#118266] Re: true? & false? — Bill Atkins <batkins57@...> 2004/10/29

Why would that be nice? :)

[#118268] Re: true? & false? — Mohammad Khan <mkhan@...> 2004/10/29

I prefer something like,

[#118270] Re: true? & false? — James Edward Gray II <james@...> 2004/10/29

On Oct 29, 2004, at 10:16 AM, Mohammad Khan wrote:

[#118276] Re: true? & false? — Mohammad Khan <mkhan@...> 2004/10/29

On Fri, 2004-10-29 at 11:22, James Edward Gray II wrote:

[#118294] Re: true? & false? — Austin Ziegler <halostatue@...> 2004/10/29

On Sat, 30 Oct 2004 00:47:31 +0900, Mohammad Khan <mkhan@lextranet.com> wrote:

[#118295] Re: true? & false? — Mohammad Khan <mkhan@...> 2004/10/29

On Fri, 2004-10-29 at 13:43, Austin Ziegler wrote:

[#118298] Another scrach on head — Mohammad Khan <mkhan@...> 2004/10/29

[#118299] Re: Another scrach on head — Jamis Buck <jgb3@...> 2004/10/29

Mohammad Khan wrote:

[#118304] Re: Another scrach on head — Mohammad Khan <mkhan@...> 2004/10/29

On Fri, 2004-10-29 at 14:05, Jamis Buck wrote:

[#118306] Re: Another scrach on head — Mohammad Khan <mkhan@...> 2004/10/29

On Fri, 2004-10-29 at 14:16, Mohammad Khan wrote:

[#118308] Re: Another scrach on head — Jamis Buck <jgb3@...> 2004/10/29

Mohammad Khan wrote:

[#118345] Re: Another scrach on head — Yukihiro Matsumoto <matz@...> 2004/10/30

Hi,

[#118596] Re: Another scrach on head — Mohammad Khan <mkhan@...> 2004/11/01

On Sat, 2004-10-30 at 00:03, Yukihiro Matsumoto wrote:

[#118598] Re: Another scrach on head — "David A. Black" <dblack@...> 2004/11/01

Hi --

[#118602] Re: Another scrach on head — Ara.T.Howard@... 2004/11/01

On Tue, 2 Nov 2004, David A. Black wrote:

[#118627] Re: Another scrach on head — "Jim Weirich" <jim@...> 2004/11/01

[#118629] Re: Another scrach on head — Austin Ziegler <halostatue@...> 2004/11/01

On Tue, 2 Nov 2004 05:47:18 +0900, Jim Weirich <jim@weirichhouse.org> wrote:

[#119859] Re: true? & false? — "Robert Klemme" <bob.news@...> 2004/11/11

[#119879] Re: true? & false? — Mohammad Khan <mkhan@...> 2004/11/11

The main reason I brought up this issue is:

[#119938] Re: true? & false? — Austin Ziegler <halostatue@...> 2004/11/11

On Fri, 12 Nov 2004 00:28:35 +0900, Mohammad Khan

[#119888] Re: true? & false? — "Robert Klemme" <bob.news@...> 2004/11/11

[#119917] Re: true? & false? — Jean-Hugues ROBERT <jean_hugues_robert@...> 2004/11/11

Hi there,

[#119937] Re: true? & false? — Logan Capaldo <logancapaldo@...> 2004/11/11

Well I have written true? and false? methods in the past. Forgetting

[#119939] Re: true? & false? — Austin Ziegler <halostatue@...> 2004/11/11

On Fri, 12 Nov 2004 04:47:27 +0900, Logan Capaldo

[#115455] RubyConf 2004 sessions available (audio/mp3) — Richard Kilmer <rich@...>

All,

24 messages 2004/10/07
[#115572] Re: [ANN] RubyConf 2004 sessions available (audio/mp3) — Mathieu Blondel <matt@...> 2004/10/08

[#115457] dev-utils v1.0 — Gavin Sinclair <gsinclair@...>

Hi all,

15 messages 2004/10/07

[#115544] Re: quality of error messages — "Pe, Botp" <botp@...>

Yukihiro Matsumoto [mailto:matz@ruby-lang.org] wrote:

16 messages 2004/10/08
[#115545] Re: quality of error messages — Yukihiro Matsumoto <matz@...> 2004/10/08

Hi,

[#115546] Re: quality of error messages — Jamis Buck <jgb3@...> 2004/10/08

Yukihiro Matsumoto wrote:

[#115551] Re: quality of error messages — Yukihiro Matsumoto <matz@...> 2004/10/08

Hi,

[#115586] rails vs Java Struts — Armin Roehrl <armin@...>

Hi,

26 messages 2004/10/08

[#115614] Geodesic Dome Faces (#3) — Ruby Quiz <james@...>

The three rules of Ruby Quiz:

31 messages 2004/10/08

[#115652] Problems with my first multithreaded Rupy programm — "Tassilo Horn" <heimdall@...>

Hi,

11 messages 2004/10/08

[#115684] ANN: Free-form-operators patch — Markus <markus@...>

All --

102 messages 2004/10/08
[#115698] Re: ANN: Free-form-operators patch — gabriele renzi <rff_rff@...> 2004/10/08

Markus ha scritto:

[#115702] Re: ANN: Free-form-operators patch — Markus <markus@...> 2004/10/08

On Fri, 2004-10-08 at 11:44, gabriele renzi wrote:

[#115704] Re: ANN: Free-form-operators patch — "Jason Voegele" <jason@...> 2004/10/08

Markus said:

[#115728] Re: ANN: Free-form-operators patch — Charles Hixson <charleshixsn@...> 2004/10/08

Jason Voegele wrote:

[#115752] Re: ANN: Free-form-operators patch — "Jim Weirich" <jim@...> 2004/10/08

[#115774] Re: ANN: Free-form-operators patch — Markus <markus@...> 2004/10/09

On Fri, 2004-10-08 at 15:39, Jim Weirich wrote:

[#115699] Re: ANN: Free-form-operators patch — Hal Fulton <hal9000@...> 2004/10/08

gabriele renzi wrote:

[#115705] Re: ANN: Free-form-operators patch — Markus <markus@...> 2004/10/08

On Fri, 2004-10-08 at 11:54, Hal Fulton wrote:

[#115713] Re: ANN: Free-form-operators patch — Hal Fulton <hal9000@...> 2004/10/08

Markus wrote:

[#115719] Re: ANN: Free-form-operators patch — Markus <markus@...> 2004/10/08

On Fri, 2004-10-08 at 12:43, Hal Fulton wrote:

[#115726] Re: ANN: Free-form-operators patch — Hal Fulton <hal9000@...> 2004/10/08

Markus wrote:

[#115830] Re: ANN: Free-form-operators patch — "David A. Black" <dblack@...> 2004/10/09

Hi --

[#115796] Re: ANN: Free-form-operators patch — gabriele renzi <rff_rff@...> 2004/10/09

Markus ha scritto:

[#115872] Re: ANN: Free-form-operators patch — Charles Hixson <charleshixsn@...> 2004/10/09

gabriele renzi wrote:

[#115955] Re: ANN: Free-form-operators patch — Brian Candler <B.Candler@...> 2004/10/10

On Sun, Oct 10, 2004 at 04:19:30AM +0900, Charles Hixson wrote:

[#115971] Re: ANN: Free-form-operators patch — "trans. (T. Onoma)" <transami@...> 2004/10/10

On Sunday 10 October 2004 05:48 am, Brian Candler wrote:

[#115988] Re: ANN: Free-form-operators patch — Markus <markus@...> 2004/10/10

On Sun, 2004-10-10 at 02:48, Brian Candler wrote:

[#116087] Re: ANN: Free-form-operators patch — Yukihiro Matsumoto <matz@...> 2004/10/11

Hi,

[#115707] TempFile — Matt Maycock <ummaycoc@...>

[ummaycoc@localhost ummaycoc]$ ruby -v

18 messages 2004/10/08
[#115771] Re: TempFile — Ara.T.Howard@... 2004/10/09

On Sat, 9 Oct 2004, Matt Maycock wrote:

[#115881] Re: TempFile — Matt Maycock <ummaycoc@...> 2004/10/09

Nope :-(

[#115787] Definitive method for managing ruby installations — Carl Youngblood <carl.youngblood@...>

It seems like most ruby programmers build and install ruby from

13 messages 2004/10/09

[#115806] Re: Ruby is a slow performer — gabriele renzi <rff_rff@...>

Sergei Gnezdov ha scritto:

20 messages 2004/10/09
[#119298] Re: Ruby is a slow performer — Christian Szegedy <szegedy@...> 2004/11/05

gabriele renzi wrote:

[#119302] Re: Ruby is a slow performer — "David G. Andersen" <dga@...> 2004/11/05

On Sat, Nov 06, 2004 at 06:23:41AM +0900, Christian Szegedy scribed:

[#119366] Re: Ruby is a slow performer — Christian Szegedy <szegedy@...> 2004/11/06

David G. Andersen wrote:

[#115856] Hypergraph? — Hal Fulton <hal9000@...>

I've looked a little at Hypergraph (http://hypergraph.sourceforge.net) and I

26 messages 2004/10/09
[#115899] Re: Hypergraph? — Kaspar Schiess <eule@...> 2004/10/09

-----BEGIN PGP SIGNED MESSAGE-----

[#115885] Ruby VM Projects — "Mark Wassell" <mwassel@...>

There are a number of RubyVM machine projects some just starting, some

23 messages 2004/10/09

[#115954] DI service change notifications (Syringe) — leon breedt <bitserf@...>

hi,

14 messages 2004/10/10

[#116007] Putting some code out to DRY — "trans. (T. Onoma)" <transami@...>

13 messages 2004/10/10

[#116039] Ruby programming styles and new program? — Bill <bi11@...>

Hello,

17 messages 2004/10/11
[#116092] Re: Ruby programming styles and new program? — Eivind Eklund <eeklund@...> 2004/10/11

On Mon, 11 Oct 2004 09:04:40 +0900, Bill <bi11@lynxview.com> wrote:

[#116096] case based on object class — George Moschovitis <gm@...>

Hello everyone,

14 messages 2004/10/11
[#116098] Re: [Q] case based on object class — Hal Fulton <hal9000@...> 2004/10/11

George Moschovitis wrote:

[#116226] documentation as source — "Randy W. Sims" <ml-ruby@...>

Are there any Ruby modules that allow documentation to act as source

59 messages 2004/10/12
[#116281] Re: documentation as source — Bil Kleb <Bil.Kleb@...> 2004/10/12

Randy W. Sims wrote:

[#116284] Re: documentation as source — Florian Gross <flgr@...> 2004/10/12

Bil Kleb wrote:

[#116566] Re: documentation as source — Nathaniel Talbott <nathaniel@...> 2004/10/14

On Oct 12, 2004, at 07:39, Florian Gross wrote:

[#116693] Re: documentation as source — "trans. (T. Onoma)" <transami@...> 2004/10/15

On Wednesday 13 October 2004 09:19 pm, Nathaniel Talbott wrote:

[#116983] Re: documentation as source — Massimiliano Mirra - bard <mmirra@...> 2004/10/18

Eivind Eklund <eeklund@gmail.com> writes:

[#117022] Re: documentation as source — Eivind Eklund <eeklund@...> 2004/10/19

On Tue, 19 Oct 2004 05:09:22 +0900, Massimiliano Mirra - bard

[#117025] Re: documentation as source — Bil Kleb <Bil.Kleb@...> 2004/10/19

Eivind Eklund wrote:

[#117026] Re: documentation as source — Eivind Eklund <eeklund@...> 2004/10/19

On Tue, 19 Oct 2004 22:33:57 +0900, Bil Kleb <bil.kleb@nasa.gov> wrote:

[#117029] Re: documentation as source — Peter Hickman <peter@...> 2004/10/19

Eivind Eklund wrote:

[#117033] Re: documentation as source — Mauricio Fern疣dez <batsman.geo@...> 2004/10/19

On Tue, Oct 19, 2004 at 11:08:35PM +0900, Peter Hickman wrote:

[#116271] "nan".to_f ? — Thomas Fini Hansen <beast@...>

I ran into this difference:

29 messages 2004/10/12
[#116276] Re: "nan".to_f ? — Stephan K舂per <Stephan.Kaemper@...> 2004/10/12

Hi Thomas, hi Rubyists

[#116340] Re: "nan".to_f ? — Markus <markus@...> 2004/10/12

[#116343] Re: "nan".to_f ? — Mikael Brockman <mikael@...> 2004/10/12

Markus <markus@reality.com> writes:

[#116354] Re: "nan".to_f ? — Stephan K舂per <Stephan.Kaemper@...> 2004/10/12

Mikael Brockman wrote:

[#116318] dev-utils v1.0.1 — Gavin Sinclair <gsinclair@...>

Hi folks,

13 messages 2004/10/12

[#116408] eRuby for Windows — Gavin Kistner <gavin@...>

I have a situation where I need to create/write static web pages using

15 messages 2004/10/13

[#116474] Gems Install Problem — jim@...

Hi

14 messages 2004/10/13

[#116478] Sharing variables across methods — David Garamond <lists@...6.isreserved.com>

When writing short scripts (several pages long) I often want to share

17 messages 2004/10/13
[#116484] Re: Sharing variables across methods — Jamis Buck <jgb3@...> 2004/10/13

David Garamond wrote:

[#116546] using the RSS standard lib — Francis Hwang <sera@...>

Is anybody out there using the RSS standard lib that comes with Ruby

22 messages 2004/10/13
[#116552] Re: using the RSS standard lib — Nikolai Weibull <ruby-talk@...> 2004/10/13

* Francis Hwang <sera@fhwang.net> [Oct 13, 2004 23:10]:

[#116608] To all people writing BBS on Rails: let's join forces — Alexey Verkhovsky <alex@...>

I've noticed lately that there are at least four different projects

22 messages 2004/10/14

[#116615] Rounding to X digits — Eric Anderson <eric@...>

This seems like such a basic question yet I can't really find the answer

26 messages 2004/10/14
[#116662] Re: Rounding to X digits — Markus <markus@...> 2004/10/14

Here's mine (with a few extras):

[#116739] Re: Rounding to X digits — "trans. (T. Onoma)" <transami@...> 2004/10/15

On Thursday 14 October 2004 01:55 pm, Markus wrote:

[#116652] Eating sandwiches in the park — Markus <markus@...>

30 messages 2004/10/14
[#116657] Re: Eating sandwiches in the park — Eivind Eklund <eeklund@...> 2004/10/14

On Fri, 15 Oct 2004 02:13:35 +0900, Markus <markus@reality.com> wrote:

[#116661] Re: Eating sandwiches in the park — Brian Wisti <brianwisti@...> 2004/10/14

[#116701] drb, Session::Bash & FreeBSD — benny <listen@...>

Dear list,

17 messages 2004/10/15

[#116707] Can one simulate go to in Ruby? Is it possible? — Roman K9 <litleguy@...>

Hi,

18 messages 2004/10/15

[#116721] Again some problem with my multithreaded teadrinker app — "Tassilo Horn" <heimdall@...>

Hi,

12 messages 2004/10/15

[#117127] A concise description of Ruby? — "Curt Hibbs" <curt@...>

Yesterday, a co-worker came into my office and saw the shiny, new pickaxe II

91 messages 2004/10/20
[#117150] Re: A concise description of Ruby? — James Edward Gray II <james@...> 2004/10/20

On Oct 20, 2004, at 7:47 AM, Curt Hibbs wrote:

[#117161] Re: A concise description of Ruby? — James Britt <jamesUNDERBARb@...> 2004/10/20

I like most of the suggestions so far.

[#117192] Re: A concise description of Ruby? — Edgardo Hames <ehames@...> 2004/10/20

On Thu, 21 Oct 2004 00:59:50 +0900, James Britt

[#117199] Re: A concise description of Ruby? — "Curt Hibbs" <curt@...> 2004/10/20

Edgardo Hames wrote:

[#117200] Python vs. Ruby (Re: A concise description of Ruby?) — Jamis Buck <jgb3@...> 2004/10/20

Curt Hibbs wrote:

[#117231] Re: Python vs. Ruby (Re: A concise description of Ruby?) — Eivind Eklund <eeklund@...> 2004/10/20

On Thu, 21 Oct 2004 04:06:35 +0900, Jamis Buck <jgb3@email.byu.edu> wrote:

[#117233] Re: Python vs. Ruby (Re: A concise description of Ruby?) — gabriele renzi <rff_rff@...> 2004/10/20

Eivind Eklund ha scritto:

[#117165] Re: A concise description of Ruby? — Simon Strandgaard <neoneye@...> 2004/10/20

On Wednesday 20 October 2004 14:47, Curt Hibbs wrote:

[#117166] Re: A concise description of Ruby? — James Britt <jamesUNDERBARb@...> 2004/10/20

Simon Strandgaard wrote:

[#117170] Re: A concise description of Ruby? — "Curt Hibbs" <curt@...> 2004/10/20

James Britt wrote:

[#117273] CamelCase issues — Michael Neumann <mneumann@...>

Hi,

30 messages 2004/10/21

[#117331] A little help on finding the closest match — "trans. (T. Onoma)" <transami@...>

Better way to find the closest match?

14 messages 2004/10/22

[#117459] RubyForge has been slow today because... — Richard Kilmer <rich@...>

Some freaking dork at the following IP address(s) was continually

76 messages 2004/10/24
[#117463] Garden Spam (was: RubyForge has been slow today because...) — "trans. (T. Onoma)" <transami@...> 2004/10/24

Speaking of attacks, I jumped over to the Garden Wiki just now and see that

[#117464] Re: Garden Spam — David Ross <dross@...> 2004/10/24

trans. (T. Onoma) wrote:

[#117474] Re: Garden Spam — gabriele renzi <rff_rff@...> 2004/10/24

David Ross ha scritto:

[#117485] Re: Garden Spam — "trans. (T. Onoma)" <transami@...> 2004/10/24

On Sunday 24 October 2004 06:29 am, gabriele renzi wrote:

[#117495] Re: Garden Spam — David Ross <dross@...> 2004/10/24

trans. (T. Onoma) wrote:

[#117509] Re: Garden Spam — "trans. (T. Onoma)" <transami@...> 2004/10/24

On Sunday 24 October 2004 10:52 am, David Ross wrote:

[#117517] Re: Garden Spam — Jamis Buck <jgb3@...> 2004/10/24

trans. (T. Onoma) wrote:

[#117586] Re: Garden Spam — Austin Ziegler <halostatue@...> 2004/10/25

On Mon, 25 Oct 2004 02:24:51 +0900, Jamis Buck <jgb3@email.byu.edu> wrote:

[#117588] Re: Garden Spam — Joey Gibson <joey@...> 2004/10/25

Austin Ziegler wrote:

[#117591] Re: Garden Spam — Jamis Buck <jgb3@...> 2004/10/25

Joey Gibson wrote:

[#117595] Re: Garden Spam — "trans. (T. Onoma)" <transami@...> 2004/10/25

On Monday 25 October 2004 11:35 am, Jamis Buck wrote:

[#117483] String#first / String#last — Simon Strandgaard <neoneye@...>

problem:

30 messages 2004/10/24
[#117538] Re: [rcr] String#first / String#last — djberg96@... (Daniel Berger) 2004/10/24

Simon Strandgaard <neoneye@adslhome.dk> wrote in message news:<200410241718.48182.neoneye@adslhome.dk>...

[#117543] Re: [rcr] String#first / String#last — Hal Fulton <hal9000@...> 2004/10/25

Daniel Berger wrote:

[#117557] Re: [rcr] String#first / String#last — Yukihiro Matsumoto <matz@...> 2004/10/25

Hi,

[#117540] Writing documentation in YAML - any advice? — "Its Me" <itsme213@...>

It will be a decent sized document. WinXP platform.

15 messages 2004/10/24

[#117598] Server Programming — Andy Stone <xsltguru@...>

Hello all,

20 messages 2004/10/25
[#117676] Re: Server Programming — Francis Hwang <sera@...> 2004/10/25

Hi Andy,

[#117685] Re: Server Programming — Andy Stone <xsltguru@...> 2004/10/26

Hello Francis,

[#117689] Re: Server Programming — Joel VanderWerf <vjoel@...> 2004/10/26

Andy Stone wrote:

[#117675] Errors in line numbers reported? — Hal Fulton <hal9000@...>

Has anyone ever seen Ruby report incorrect line numbers

37 messages 2004/10/25
[#117696] Re: Errors in line numbers reported? — Yukihiro Matsumoto <matz@...> 2004/10/26

Hi,

[#117699] Re: Errors in line numbers reported? — Ara.T.Howard@... 2004/10/26

On Tue, 26 Oct 2004, Yukihiro Matsumoto wrote:

[#117705] Re: Errors in line numbers reported? — Yukihiro Matsumoto <matz@...> 2004/10/26

Hi,

[#117712] Re: Errors in line numbers reported? — Ara.T.Howard@... 2004/10/26

On Tue, 26 Oct 2004, Yukihiro Matsumoto wrote:

[#117721] Re: Errors in line numbers reported? — Markus <markus@...> 2004/10/26

On Mon, 2004-10-25 at 20:54, Ara.T.Howard@noaa.gov wrote:

[#117731] Re: Errors in line numbers reported? — ts <decoux@...> 2004/10/26

>>>>> "M" == Markus <markus@reality.com> writes:

[#117698] Re: Errors in line numbers reported? — Hal Fulton <hal9000@...> 2004/10/26

Yukihiro Matsumoto wrote:

[#117778] Re: Errors in line numbers reported? — nobu.nokada@... 2004/10/26

Hi,

[#117811] New RCRchive is open — "David A. Black" <dblack@...>

Dear Rubyists --

14 messages 2004/10/26

[#117836] Auto-completion editor/IDE — "Eli Tucker" <eli-news@...>

Does anyone have any info on an IDE or editor that supports

17 messages 2004/10/26

[#117839] New RubyGarden article: "Reflections on Rails" — Chad Fowler <chadfowler@...>

Rubyists,

10 messages 2004/10/27

[#117854] Name Dropping — "Curt Hibbs" <curt@...>

I'm in the final leg of preparing for a presentation I'm giving on Friday to

18 messages 2004/10/27

[#117929] The real Ruby vs. Python. — Abe Vionas_MailingList <mailinglist_abe@...>

What it comes down to is what it's coming down to for

71 messages 2004/10/27
[#118026] Re: Gems as key? Re: The real Ruby vs. Python. — "Its Me" <itsme213@...> 2004/10/27

"Eivind Eklund" <eeklund@gmail.com> wrote in message

[#118046] Re: Gems as key? Re: The real Ruby vs. Python. — Mauricio Fern疣dez <batsman.geo@...> 2004/10/27

On Thu, Oct 28, 2004 at 05:49:02AM +0900, Its Me wrote:

[#118054] Re: Gems as key? Re: The real Ruby vs. Python. — "trans. (T. Onoma)" <transami@...> 2004/10/28

Then it sounds like that RubyGems needs to adopt the framework of RPA, and

[#118058] Re: Gems as key? Re: The real Ruby vs. Python. — David Ross <dross@...> 2004/10/28

You can create your own packages with RPA as well. RPA doesnt have an

[#118073] Re: Gems as key? Re: The real Ruby vs. Python. — Andreas Schwarz <usenet@...> 2004/10/28

David Ross wrote:

[#118097] Re: Gems as key? Re: The real Ruby vs. Python. — Mauricio Fern疣dez <batsman.geo@...> 2004/10/28

On Thu, Oct 28, 2004 at 01:44:00PM +0900, Andreas Schwarz wrote:

[#118098] Re: Gems as key? Re: The real Ruby vs. Python. — "David A. Black" <dblack@...> 2004/10/28

On Thu, 28 Oct 2004, Mauricio Fern疣dez wrote:

[#118106] Re: Gems as key? Re: The real Ruby vs. Python. — Mauricio Fern疣dez <batsman.geo@...> 2004/10/28

On Thu, Oct 28, 2004 at 09:08:08PM +0900, David A. Black wrote:

[#117937] Re: The real Ruby vs. Python. — Alexander Kellett <ruby-lists@...> 2004/10/27

On Wed, Oct 27, 2004 at 11:11:19PM +0900, Abe Vionas_MailingList wrote:

[#117967] Gems as key? Re: The real Ruby vs. Python. — "Its Me" <itsme213@...> 2004/10/27

[#117982] Rounding error, (100.0 * 9.95).to_i == 994 — Dan Janowski <danj@3skel.com>

I can understand floating point errors, but this one seems too small

84 messages 2004/10/27
[#117984] Re: Rounding error, (100.0 * 9.95).to_i == 994 — Walter Szewelanczyk <walter@...> 2004/10/27

Dan Janowski wrote:

[#117987] Re: Rounding error, (100.0 * 9.95).to_i == 994 — Bill Atkins <batkins57@...> 2004/10/27

OK, that would make sense if v's value was 994.5, but it seems to be

[#117993] Re: Rounding error, (100.0 * 9.95).to_i == 994 — Jamis Buck <jgb3@...> 2004/10/27

Bill Atkins wrote:

[#118005] Re: Rounding error, (100.0 * 9.95).to_i == 994 — Jason DiCioccio <jd@...> 2004/10/27

Hello!

[#118006] Re: Rounding error, (100.0 * 9.95).to_i == 994 — "David G. Andersen" <dga@...> 2004/10/27

On Thu, Oct 28, 2004 at 04:49:28AM +0900, Jason DiCioccio scribed:

[#118020] Re: Rounding error, (100.0 * 9.95).to_i == 994 — Hal Fulton <hal9000@...> 2004/10/27

David G. Andersen wrote:

[#118053] Re: Rounding error, (100.0 * 9.95).to_i == 994 — markus@... 2004/10/28

On Thu, 28 Oct 2004, Hal Fulton wrote:

[#118055] Re: Rounding error, (100.0 * 9.95).to_i == 994 — "trans. (T. Onoma)" <transami@...> 2004/10/28

On Wednesday 27 October 2004 08:22 pm, markus@reality.com wrote:

[#118126] Re: Rounding error, (100.0 * 9.95).to_i == 994 — Markus <markus@...> 2004/10/28

On Wed, 2004-10-27 at 17:40, trans. (T. Onoma) wrote:

[#118215] Re: Rounding error, (100.0 * 9.95).to_i == 994 — "trans. (T. Onoma)" <transami@...> 2004/10/29

On Thursday 28 October 2004 12:13 pm, Markus wrote:

[#118216] Re: Rounding error, (100.0 * 9.95).to_i == 994 — Hal Fulton <hal9000@...> 2004/10/29

trans. (T. Onoma) wrote:

[#118341] Re: Rounding error, (100.0 * 9.95).to_i == 994 — "trans. (T. Onoma)" <transami@...> 2004/10/30

On Friday 29 October 2004 03:00 am, Hal Fulton wrote:

[#118344] Re: Rounding error, (100.0 * 9.95).to_i == 994 — Hal Fulton <hal9000@...> 2004/10/30

trans. (T. Onoma) wrote:

[#118349] Re: Rounding error, (100.0 * 9.95).to_i == 994 — "trans. (T. Onoma)" <transami@...> 2004/10/30

On Saturday 30 October 2004 12:00 am, Hal Fulton wrote:

[#118019] Re: Rounding error, (100.0 * 9.95).to_i == 994 — Hal Fulton <hal9000@...> 2004/10/27

Jason DiCioccio wrote:

[#118025] Re: Rounding error, (100.0 * 9.95).to_i == 994 — "trans. (T. Onoma)" <transami@...> 2004/10/27

On Wednesday 27 October 2004 04:36 pm, Hal Fulton wrote:

[#118028] Re: Rounding error, (100.0 * 9.95).to_i == 994 — Hal Fulton <hal9000@...> 2004/10/27

trans. (T. Onoma) wrote:

[#118029] Re: Rounding error, (100.0 * 9.95).to_i == 994 — Jamis Buck <jgb3@...> 2004/10/27

trans. (T. Onoma) wrote:

[#118086] Re: Rounding error, (100.0 * 9.95).to_i == 994 — Mark Hubbart <discordantus@...> 2004/10/28

On Thu, 28 Oct 2004 05:57:53 +0900, Jamis Buck <jgb3@email.byu.edu> wrote:

[#118113] Re: Rounding error, (100.0 * 9.95).to_i == 994 — Dan Janowski <danj@3skel.com> 2004/10/28

I just want to thank all of you for a stimulating, interesting and, in

[#118125] Re: Rounding error, (100.0 * 9.95).to_i == 994 — "trans. (T. Onoma)" <transami@...> 2004/10/28

On Thursday 28 October 2004 11:06 am, Dan Janowski wrote:

[#118132] Re: Rounding error, (100.0 * 9.95).to_i == 994 — Charles Mills <cmills@...> 2004/10/28

On Oct 28, 2004, at 9:12 AM, trans. (T. Onoma) wrote:

[#118141] Re: Rounding error, (100.0 * 9.95).to_i == 994 — Guillaume Marcais <guslist@...> 2004/10/28

On Thu, 2004-10-28 at 04:23, Mark Hubbart wrote:

[#118153] Re: Rounding error, (100.0 2000 2001 Desktop Money Projects Protege.png Protege_2.1 Q3.DIR Quicken RCS Screenshot-1.png Screenshot-2.png Screenshot-3.png Screenshot.png afs-backup afshome amixer.works b basic.edl bin bruin-woods c4isr.owl c4isr.pprj cellphones.sxc comedi comedilib config config-n6uni config.austin conv-factors.sxc debian drvinfo.txt dry.xml ds-tools emachines evolution float.sxc fnfix foomatic-db-current.tar.gz grp-backup iFog-Aqua20-1.tar.gz id_dsa.pub income jimo-core-sjenkins job-search ken-cole latex2docbook letters lfront log mbse modules n6uni-etc.tar.gz n6uni-home.tar.gz n6uni.tar.gz nasa nisotr old-ruby-tools openafs photos pickaxe2.pdf rdtmerge resume rexml.sxc ruby-bug ruby-oscon.sxi ruby-tidal ruby-tools smbmount.3.0.7 software themes tidal-3-11 tidal-3-5-patches tidal-cvsroot-archive tidal-data tidal-head tidal-poster-corrected.ppt tidal-poster.ppt tidal-web tidal-xdemo tidalsim.tar.gz uuid vim-ruby-snapshot-2003-10-12 wet.xml yepp 9.95).to_i == 994 — Steven Jenkins <steven.jenkins@...> 2004/10/28

Guillaume Marcais wrote:

[#118169] Re: Rounding error, (100.0 2000 2001 Desktop Money Projects Protege.png Protege_2.1 Q3.DIR Quicken RCS Screenshot-1.png Screenshot-2.png Screenshot-3.png Screenshot.png afs-backup afshome amixer.works b basic.edl bin bruin-woods c4isr.owl c4isr.pprj cellphones.sxc comedi comedilib config config-n6uni config.austin conv-factors.sxc debian drvinfo.txt dry.xml ds-tools emachines evolution float.sxc fnfix foomatic-db-current.tar.gz grp-backup iFog-Aqua20-1.tar.gz id_dsa.pub income jimo-core-sjenkins job-search ken-cole latex2docbook letters lfront log mbse modules n6uni-etc.tar.gz n6uni-home.tar.gz n6uni.tar.gz nasa nisotr old-ruby-tools openafs photos pickaxe2.pdf rdtmerge resume rexml.sxc ruby-bug ruby-oscon.sxi ruby-tidal ruby-tools smbmount.3.0.7 software themes tidal-3-11 tidal-3-5-patches tidal-cvsroot-archive tidal-data tidal-head tidal-poster-corrected.ppt tidal-poster.ppt tidal-web tidal-xdemo tidalsim.tar.gz uuid vim-ruby-snapshot-2003-10-12 wet.xml yepp 9.95).to_i == 994 — Guillaume Marcais <guslist@...> 2004/10/28

On Thu, 2004-10-28 at 14:29, Steven Jenkins wrote:

[#118211] Thread::list and GC — "Ara.T.Howard" <Ara.T.Howard@...>

15 messages 2004/10/29

[#118249] RubyGarden wiki patch — Chad Fowler <chadfowler@...>

FYI, I've just implemented this

33 messages 2004/10/29
[#118252] Re: RubyGarden wiki patch — David Ross <dross@...> 2004/10/29

Chad Fowler wrote:

[#118387] Re: RubyGarden wiki patch — Brian =?ISO-8859-15?Q?Schr=F6der?= <ruby@...> 2004/10/30

On Fri, 29 Oct 2004 22:13:51 +0900

[#118388] Re: RubyGarden wiki patch — David Ross <dross@...> 2004/10/30

Brian Schrer wrote:

[#118392] Re: RubyGarden wiki patch — Mikael Brockman <mikael@...> 2004/10/30

David Ross <dross@code-exec.net> writes:

[#118395] Re: RubyGarden wiki patch — David Ross <dross@...> 2004/10/30

Mikael Brockman wrote:

[#118360] Ruby on Rails presentation added to the WhyRuby repository — "Curt Hibbs" <curt@...>

I just added my presentation of Ruby on Rails to the WhyRuby repository.

13 messages 2004/10/30

[#118423] Flea vs RubyGarden — "Phlip" <phlip_cpp@...>

Rubistas:

15 messages 2004/10/30

[#118447] New Ruby conditional semantics thoughts — Brian Mitchell <binary42@...>

The basic background was begun by someone asking a question about

12 messages 2004/10/30

Re: A concise description of Ruby?

From: Florian Gross <flgr@...>
Date: 2004-10-20 17:34:22 UTC
List: ruby-talk #117184
Curt Hibbs wrote:

> James Britt wrote:
>>Simon Strandgaard wrote:
>>>Ruby allows to you enhance the builtin string class with you
>>
>>own methods,
>>
>>>which you can invoke  "im a string".own_method
>>>
>>>Thats the sentence I use most.
>>>I don't know if there are other languages that allow for this?
>>
>>JavaScript.
>>
>>Really.
>>
>>"JavaScript: It's sweeter than you think."
> Yes, JavaScript is underrated. A lot of the things we do with Ruby can be
> done with JavaScript (its just not as clean).

See attachment. ;)

Regards,
Florian Gross

Attachments (1)

ruby.js (18.2 KB, text/javascript)
Object.prototype.clone = function(deepClone) {
  var result = new this.constructor()
  for (var property in this) {
    if (deepClone && typeof(this[property]) == 'object') {
      result[property] = this[property].clone(deepClone)
    } else {
      result[property] = this[property]
    }
  }
  return(result)
}

Object.prototype.extend = function(other) {
  if (!this.mixins) this.mixins = []
  this.mixins.push(other)
  for (var property in other)
    if (!this.hasOwnProperty(property))
      this[property] = other[property]
}

Object.prototype.cmp = function(other) {
  if (this < other) return(-1)
  if (this > other) return(+1)
  return(0)
}

Object.prototype.valuesAt = function() {
  var obj = this
  return(arguments.toArray().map(function(index) {
    return(obj[index])
  }))
}

Object.prototype.toArray = function() {
  if (!this.length) throw("Can't convert")
  var result = []
  for (var i = 0; i < this.length; i++)
    result.push(this[i])
  return(result)
}

Object.prototype.hash = function() {
  return(this.toSource().hash())
}

Object.prototype.instanceOf = function(klass) {
  return(this.constructor == klass)
}

Object.prototype.isA = Object.prototype.kindOf = function(klass) {
  if (this.instanceOf(klass)) return(true)
  if (this["mixins"] != undefined && this.mixins.includes(klass))
    return(true)
  return(false)
}

Object.prototype.methods = function() {
  var result = []
  for (var property in this)
    if (typeof(this[property]) == "function")
      result.push(property)
  return(result)
}

Object.prototype.respondTo = function(method) {
  return(this.methods().includes(method))
}

Object.prototype.send = function(method) {
  var rest = arguments.toArray().last(-1)
  if (!this.respondTo(method)) throw("undefined method")
  return(this[method].apply(this, rest))
}

Object.prototype.instanceEval = function(code) {
  if (code.isA(Function))
    return(code.apply(this))
  else
    return(eval(code.toString()))
}

Number.prototype.times = function(block) {
  for (var i = 0; i < this; i++) block(i)
}

Number.prototype.upto = function(other, block) {
  for (var i = this; i <= other; i++) block(i)
}

Number.prototype.downto = function(other, block) {
  for (var i = this; i >= other; i--) block(i)
}

Number.prototype.towards = function(other, block) {
  var step = this.cmp(other)
  for (var i = this; i !== other - step; i -= step)
    block(i) 
}

Number.prototype.succ = function() { return(this + 1) }
Number.prototype.pred = function() { return(this - 1) }

Number.prototype.chr = function() { return(String.fromCharCode(this)) }

enumerable = new Object()
enumerable.eachWindow = function(window, block) {
  if (!window.isA(Range)) window = range(0, window)
  elements = [], pushed = 0
  this.each(function(item, index) {
    elements.push(item)
    pushed += 1
    if (pushed % window.rend == 0) {
      start = [0, window.start - window.rend + pushed].max()
      end = [0, window.rend + pushed].max()
      block(elements.fetch(xrange(start, end)), index)
    }
  })
}

enumerable.collect = enumerable.map = function(block) {
  var result = []
  this.each(function(item, index) {
    result.push(block(item, index))
  })
  return(result)
}

enumerable.toArray = enumerable.entries = function() {
  return(this.map(function(item) { return(item) }))
}

enumerable.inject = function(firstArg) {
  var state, block, first = true
  if (arguments.length == 1) {
    block = firstArg
  } else {
    state = firstArg
    block = arguments[1]
  }
  this.each(function(item, index) {
    if (first && typeof(state) == "undefined")
      state = item, first = false
    else
      state = block(state, item, index)
  })
  return(state)
}

enumerable.find = enumerable.detect = function(block) {
  var result, done
  this.each(function(item, index) {
    if (!done && block(item, index)) {
      result = item
      done = true
    }
  })
  return(result)
}

enumerable.findAll = enumerable.select = function(block) {
  return(this.inject([], function(result, item, index) {
    return(block(item, index) ? result.add(item) : result)
  }))
}

enumerable.grep = function(obj) {
  return(this.findAll(function(item) {
    return(obj.test(item))
  }))
}

enumerable.reject = function(block) {
  return(this.select(function(item, index) {
    return(!block(item, index))
  }))
}

enumerable.compact = function() {
  return(this.select(function(item) {
    return(typeof(item) != "undefined")
  }))
}

enumerable.nitems = function() { return(this.compact().length) }

enumerable.sortBy = function(block) {
  return(this.map(function(item, index) {
    return([block(item, index), item])
  }).sort(function(a, b) {
    return(a[0].cmp(b[0]))
  }).map(function(item) {
    return(item[1])
  }))
}

enumerable.all = function(block) {
  return(this.findAll(block).length == this.length)
}

enumerable.any = function(block) {
  return(typeof(this.find(block)) != "undefined")
}

enumerable.includes = function(obj) {
  return(this.any(function(item) {
    return(item === obj)
  }))
}

enumerable.index = function(obj) {
  var result
  this.find(function(item, index) {
    if (obj == item) {
      result = index
      return(true)
    } else {
      return(false)
    }
  })
  return(result)
}

enumerable.uniq = function() {
  return(this.inject([], function(result, item) {
    return(result.includes(item) ? result : result.add(item))
  }))
}

enumerable.max = function(block) {
  if (!block) block = function(a, b) { return(a.cmp(b)) }
  return(this.sort(block).last())
}

enumerable.min = function(block) {
  if (!block) block = function(a, b) { return(a.cmp(b)) }
  return(this.sort(block).first())
}

enumerable.partition = function(block) {
  var positives = [], negatives = []
  this.each(function(item, index) {
    if (block(item, index))
      positives.push(item)
    else
      negatives.push(item)
  })
  return([positives, negatives])
}

enumerable.zip = function() {
  var ary = arguments.toArray()
  ary.unshift(this)
  return(ary.transpose())
}

enumerable.flatten = function(depth) {
  if (depth == undefined) depth = -1
  if (!depth) return(this)
  return(this.inject([], function(result, item) {
    var flatItem = item.respondTo("flatten") ? item.flatten(depth - 1) : [item]
    return(result.merge(flatItem))
  }))
}

Array.fromObject = function(obj) {
  if (!obj.length) throw("Can't convert")
  var result = []
  for (var i = 0; i < obj.length; i++)
    result.push(obj[i])
  return(result)
}

Array.prototype.transpose = function() {
  var result, length = -1
  this.each(function(item, index) {
    if (length < 0) {	/* first element */
      length = item.length
      result = Array.withLength(length, function() {
        return(new Array(this.length))
      })
    } else if (length != item.length) {
      throw("Element sizes differ")
    }
    item.each(function(iitem, iindex) {
      result[iindex][index] = iitem
    })
  })
  return(result)
}

Array.withLength = function(length, fallback) {
  var result = [null].mul(length)
  result.fill(fallback)
  return(result)
}

Array.prototype.each = function(block) {
  for (var index = 0; index < this.length; ++index) {
    var item = this[index]
    block(item, index)
  }
  return(this)
}
Array.prototype.extend(enumerable)

Array.prototype.isEmpty = function() { return(this.length == 0) }

Array.prototype.at = Array.prototype.fetch = function(index, length) {
  if (index.isA(Range)) {
    var end = index.rend + (index.rend < 0 ? this.length : 0)
    index = index.start
    length = end - index + 1
  }
  if (length == undefined) length = 1
  if (index < 0) index += this.length
  var result = this.slice(index, index + length)
  return(result.length == 1 ? result[0] : result)
}

Array.prototype.first = function(amount) {
  if (amount == undefined) amount = 1
  return(this.at(xrange(0, amount)))
}

Array.prototype.last = function(amount) {
  if (amount == undefined) amount = 1
  return(this.at(range(-amount, -1)))
}

Array.prototype.store = function(index) {
  var length = 1, obj
  arguments = arguments.toArray()
  arguments.shift()
  if (arguments.length == 2)
    length = arguments.shift()
  obj = arguments.shift()
  if (!obj.isA(Array)) obj = [obj]
  if (index.isA(Range)) {
    var end = index.rend + (index.rend < 0 ? this.length : 0)
    index = index.start
    length = end - index + 1
  }
  if (index < 0) index += this.length
  this.replace(this.slice(0, index).merge(obj).merge(this.slice(index + length)))
  return(this)
}

Array.prototype.insert = function(index) {
  var values = arguments.toArray().last(-1)
  if (index < 0) index += this.length + 1
  return(this.store(index, 0, values))
}

Array.prototype.update = function(other) {
  var obj = this
  other.each(function(item) { obj.push(item) })
  return(obj)
}

Array.prototype.merge = Array.prototype.concat
Array.prototype.add = function(item) { return(this.merge([item])) }

Array.prototype.clear = function() {
  var obj = this
  this.length.times(function(index) {
    delete obj[index]
  })
  this.length = 0
}

Array.prototype.replace = function(obj) {
  this.clear()
  this.update(obj)
}

Array.prototype.mul = function(count) {
  var result = []
  var obj = this
  count.times(function() { result = result.merge(obj) })
  return(result)
}

Array.prototype.fill = function(value) {
  var old_length = this.length
  var obj = this
  this.clear()
  var block
  if (typeof(value) != "function")
    block = function() { return(value) }
  else
    block = value

  old_length.times(function(i) {
    obj.push(block(i))
  })
}

Array.prototype.removeAt = function(targetIndex) {
  var result = this[targetIndex]
  var newArray = this.reject(function(item, index) {
    return(index == targetIndex)
  })
  this.replace(newArray)
  return(result)
}

Array.prototype.remove = function(obj) {
  this.removeAt(this.index(obj))
}

Array.prototype.removeIf = function(block) {
  this.replace(this.reject(block))
}

function Range(start, end, excludeEnd) {
  this.begin = this.start = start
  this.end = end
  this.excludeEnd = excludeEnd
  this.rend = excludeEnd ? end.pred() : end
  this.length = this.toArray().length
}

function range(start, end) { return(new Range(start, end)) }
function xrange(start, end) { return(new Range(start, end, true)) }

Range.prototype.toString = function() {
  return("" + this.start + (this.excludeEnd ? "..." : "..") + this.end)
}

Range.prototype.each = function(block) {
  var index = 0
  this.start.towards(this.rend, function(i) {return(block(i, index++))})
}
Range.prototype.extend(enumerable)

Range.prototype.includes = function(item) {
  return(this.start.cmp(item) == -1 && this.rend.cmp(item) == +1)
}

function Hash(defaultBlock) {
  this.defaultBlock = defaultBlock
  this.keys = []
  this.values = []
  this.length = 0
}

Hash.fromArray = function(array) {
  var result = new Hash()
  array.each(function(item) {
    var key = item[0], value = item[1]
    result.store(key, value)
  })
  return(result)
}

Hash.prototype.at = Hash.prototype.fetch = function(key, block) {
  var result
  if (this.hasKey(key))
    result = this["item_" + key.hash()]
  else {
    if (block) 
      result = block(key)
    else
      result = defaultBlock(key)
  }
  return(result)
}

Hash.prototype.store = function(key, value) {
  this.keys.push(key)
  this.values.push(value)
  this.length++
  return(this["item_" + key.hash()] = value)
}

Hash.prototype.toA = function() {
  return(this.keys.zip(this.values))
}

Hash.prototype.isEmpty = function() {
  return(this.length == 0)
}

Hash.prototype.has = Hash.prototype.includes = Hash.prototype.hasKey = function(key) {
  return(hasOwnProperty("item_" + key.hash()))
}

Hash.prototype.hasValue = function(value) {
  return(this.values.includes(value))
}

Hash.prototype.each = function(block) {
  this.toA().each(function (pair) {
    return(block(pair[1], pair[0]))
  })
}

Hash.prototype.extend(enumerable)

Hash.prototype.merge = function(other) {
  other.each(function(value, key) {
    this.store(key, value)
  })
}

Hash.prototype.remove = function(key) {
  var valueIndex = this.keys.index(key)
  var value = this.values[valueIndex]
  this.keys.remove(key)
  this.values.removeAt(valueIndex)
  delete(this["item_" + key.hash()])
  this.length--
  return([key, value])
}

Hash.prototype.removeIf = function(block) {
  this.each(function(value, key) {
    if (block(value, key))
      this.remove(key)
  })
}

Hash.prototype.shift = function() {
  return(this.remove(this.keys[0]))
}

Hash.prototype.clear = function() {
  var obj = this
  this.length.times(function() {obj.shift()})
}

Hash.prototype.replace = function(obj) {
  this.clear()
  this.merge(obj)
}

Hash.prototype.invert = function() {
  return(Hash.fromArray(this.map(function(value, key) {
    return([value, key])
  })))
}

Hash.prototype.rehash = function() {
  var result = new Hash(this.defaultBlock)
  this.each(function(value, key) {
    result.store(key, value)
  })
  this.replace(result)
}

function MatchData(matches, str, pos) {
  this.matches = matches, this.string = str
  this.begin = this.position = pos
  this.match = matches[0]
  this.captures = matches.slice(1)
  this.end = pos + this.match.length
  this.length = matches.length
  this.preMatch = str.substr(0, pos)
  this.postMatch = str.substr(this.end)
}

MatchData.prototype.toString = function() { return(this.match) }
MatchData.prototype.at = function(index) {
  return(this.matches.at(index))
}
MatchData.prototype.toArray = function() { return(this.matches) }

RegExp.prototype.match = function(str) {
  var matches
  if (matches = this.exec(str)) {
    var pos = str.search(this)
    return(new MatchData(matches, str, pos))
  }
}

String.prototype.clone = function() { return(new String(this)) }

String.prototype.each = function(block) {
  this.split("\n").each(block)
}

String.prototype.extend(enumerable)

String.prototype.toArray = function() { return(this.split("\n")) }

String.prototype.towards = function(other, block) {
  var item = this
  while (item.cmp(other) <= 0) {
    block(item)
    item = item.succ()
  }
}

String.prototype.hash = function() {
  var result = 0
  this.split("").each(function(item) {
    result += item.charCodeAt(0)
    result += (result << 10)
    result ^= (result >> 6)
  })
  result += (result << 3)
  result ^= (result >> 11)
  result += (result << 15)
  return(result)
}

String.prototype.chars = function() { return(this.split("")) }

String.prototype.at = String.prototype.fetch = function(index, length) {
  if (index.isA(Range)) {
    var end = index.rend + (index.rend < 0 ? this.length : 0)
    index = index.start
    length = end - index + 1
  }
  if (length == undefined) length = 1
  if (index < 0) index += this.length
  return(this.substr(index, length))
}

String.prototype.store = String.prototype.change = function(index) {
  var length = 1, obj
  arguments = arguments.toArray()
  arguments.shift()
  if (arguments.length == 2)
    length = arguments.shift()
  obj = arguments.shift()
  if (index.isA(Range)) {
    var end = index.rend + (index.rend < 0 ? this.length : 0)
    index = index.start
    length = end - index + 1
  }
  if (index < 0) index += this.length
  return(this.substr(0, index) + obj + this.substr(index + length))
}

String.prototype.reverse = function() {
  return(this.split("").reverse().join(""))
}

String.prototype.scan = function(pattern) {
  var str = this, result = [], oldPos = -1, match, offset = 0
  while (match = pattern.match(str)) {
    if (match.end == match.begin)
      throw("Can't have null length matches with scan()")
    var newMatch = new MatchData(match.matches, match.string, match.position + offset)
    result.push(newMatch)
    str = match.postMatch
    offset += match.toString().length
  }
  return(result)
}

String.prototype.sub = function(what, by, global) {
  var block = typeof(by) == "function" ? by : function() { return(by) }
  var matches = this.scan(what), result = this, offset = 0
  if (!global && !by.global) matches = matches.slice(0, 1)
  matches.each (function(match) {
    var replacement = block(match)
    offset += replacement.length - match.toString().length
    result = result.change(match.begin + offset, match.toString().length, replacement)
  })
  return(result)
}
String.prototype.gsub = function(what, by) { return(this.sub(what, by, true)) }

String.prototype.tr = function(from, to) {
  var map = Hash.fromArray(from.chars().zip(to.chars()))
  return(this.chars().map(function(chr) {
    return(map.includes(chr) ? map.fetch(chr) : chr)
  }).join(""))
}

String.prototype.mul = function(other) {
  var result = "", str = this
  other.times(function() { result += str })
  return(result)
}

String.prototype.isUpcase = function() { return(this == this.upcase()) }
String.prototype.isDowncase = function() { return(this == this.downcase()) }
String.prototype.isCapitalized = function() {
  return(this.fetch(0).isUpcase() && this.fetch(range(1, -1)).isDowncase())
}
String.prototype.upcase = String.prototype.toUpperCase
String.prototype.downcase = String.prototype.toLowerCase
String.prototype.capitalize = function() {
  return(this.fetch(0).upcase() + this.fetch(range(1, -1)).downcase())
}
String.prototype.swapcase = function() {
  return(this.chars().map(function(chr) {
    if (chr.isUpcase()) return(chr.downcase())
    if (chr.isDowncase()) return(chr.upcase())
    return(chr)
  }).join(""))
}
String.prototype.ord = function() { return(this.charCodeAt(0)) }

String.prototype.isEmpty = function() { return(this.length == 0) }

String.prototype.succ = function() {
  if (this.isEmpty()) return(this)
  /* numerics */
  if (/^\d+$/.test(this))
    return((Number(this) + 1).toString())
  /* just one character */
  if (this.length == 1) {
    /* letters */
    if (/[A-Za-z]/.test(this)) {
      var lastLetter = this.isUpcase() ? 'Z' : 'z'
      var firstLetter = this.isUpcase() ? 'A' : 'a'
      return((this == lastLetter) ? firstLetter.mul(2) : (this.ord() + 1).chr())
    } else {
      return(this == (-1).chr() ? 0.0.chr().mul(2) : (this.ord() + 1).chr())
    }
  /* multiple characters */
  } else {
    var result = this
    for (var index = this.length; index >= 0; index--) {
      var chr = this.at(index)
      if (chr.succ().length == 1 || index == 0)
        return(result.change(index, chr.succ()))
      else
        result = result.change(index, chr.succ().at(-1))
    }
  }
}

String.prototype.ljust = function(length, fill) {
  if (!fill) fill = " "
  if (fill.length > 1) throw("TODO: Make fills with length > 1 work.")
  return(this + fill.mul(length / fill.length - this.length))
}

In This Thread