[#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:

[#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:

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

Hi --

[#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:

[#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:

[#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:

[#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,

[#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:

[#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,

[#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,

[#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:

[#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
[#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

[#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:

[#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

[ANN] breakpoint.rb -- now with remote debugging

From: Florian Gross <flgr@...>
Date: 2004-10-11 15:29:39 UTC
List: ruby-talk #116149
Moin!

Breakpoint.rb is a small library that lets you set breakpoints by 
calling a method. When executed, a breakpoint causes an interactive ruby 
session to be spawned with the current context. This makes it especially 
useful for debugging because Ruby has powerful built-in capabilities for 
exploring object environments. (Kernel#caller, Object#inspect, 
Object#respond_to?, Kernel#local_variables, Object#instance_variables 
and so on.)

There's also support for overriding return values and for an assert() 
method that automatically sets a breakpoint in case an unexpected 
situation occurs.

---

This new version includes support for remote debugging via DRb. Using 
this you can now also debug your CGI and Rails applications (and other 
applications where you can't pollute STDIN/STDOUT by running irb 
directly). To start the DRb breakpoint service you will have to call 
Breakpoint.activate_drb -- after that you can interact with that service 
by running breakpoint_client.rb.

This is a pre-release of the next version of the code already included 
in the Ruby dev-utils project (http://dev-utils.rubyforge.org/) meaning 
that I'm not sure if it is 100% bug-free (I refactored quite a lot) -- 
if this works out well the dev-utils version can be updated.

If you have any suggestions or if you find any problems with this please 
mention them now so that I can fix them as soon as possible. Thanks!

Kind regards,
Florian Gross

Attachments (3)

binding_of_caller.rb (2.54 KB, text/x-ruby)
begin
  require 'simplecc'
rescue LoadError
  def Continuation.create(*args, &block)
    cc = nil; result = callcc {|c| cc = c; block.call(cc) if block and args.empty?}
    result ||= args
    return *[cc, *result]
  end
end

# This method returns the binding of the method that called your
# method. It will raise an Exception when you're not inside a method.
#
# It's used like this:
#   def inc_counter(amount = 1)
#     Binding.of_caller do |binding|
#       # Create a lambda that will increase the variable 'counter'
#       # in the caller of this method when called.
#       inc = eval("lambda { |arg| counter += arg }", binding)
#       # We can refer to amount from inside this block safely.
#       inc.call(amount)
#     end
#     # No other statements can go here. Put them inside the block.
#   end
#   counter = 0
#   2.times { inc_counter }
#   counter # => 2
#
# Binding.of_caller must be the last statement in the method.
# This means that you will have to put everything you want to
# do after the call to Binding.of_caller into the block of it.
# This should be no problem however, because Ruby has closures.
# If you don't do this an Exception will be raised. Because of
# the way that Binding.of_caller is implemented it has to be
# done this way.
def Binding.of_caller(&block)
  old_critical = Thread.critical
  Thread.critical = true
  count = 0
  cc, result, error, extra_data = Continuation.create(nil, nil)
  error.call if error

  tracer = lambda do |*args|
    type, context, extra_data = args[0], args[4], args
    if type == "return"
      count += 1
      # First this method and then calling one will return --
      # the trace event of the second event gets the context
      # of the method which called the method that called this
      # method.
      if count == 2
        # It would be nice if we could restore the trace_func
        # that was set before we swapped in our own one, but
        # this is impossible without overloading set_trace_func
        # in current Ruby.
        set_trace_func(nil)
        cc.call(eval("binding", context), nil, extra_data)
      end
    elsif type != "line"
      set_trace_func(nil)
      error_msg = "Binding.of_caller used in non-method context or " +
        "trailing statements of method using it aren't in the block."
      cc.call(nil, lambda { raise(ArgumentError, error_msg) }, nil)
    end
  end

  unless result
    set_trace_func(tracer)
    return nil
  else
    Thread.critical = old_critical
    case block.arity
      when 1 then yield(result)
      else yield(result, extra_data)        
    end
  end
end
breakpoint.rb (7.39 KB, text/x-ruby)
require 'irb'
require 'binding_of_caller'
require 'drb'

module Breakpoint
  extend self

  # This will pop up an interactive ruby session at a
  # pre-defined break point in a Ruby application. In
  # this session you can examine the environment of
  # the break point.
  #
  # You can get a list of variables in the context using
  # local_variables via +local_variables+. You can then
  # examine their values by typing their names.
  #
  # You can have a look at the call stack via +caller+.
  #
  # breakpoints can also return a value. They will execute
  # a supplied block for getting a default return value.
  # A custom value can be returned from the session by doing
  # +throw(:debug_return, value)+.
  #
  # You can also give names to break points which will be
  # used in the message that is displayed upon execution 
  # of them.
  #
  # Here's a sample of how breakpoints should be placed:
  #
  #   class Person
  #     def initialize(name, age)
  #       @name, @age = name, age
  #       breakpoint("Person#initialize")
  #     end
  #
  #     attr_reader :age
  #     def name
  #       breakpoint("Person#name") { @name }
  #     end
  #   end
  #
  #   person = Person.new("Random Person", 23)
  #   puts "Name: #{person.name}"
  #
  # And here is a sample debug session:
  #
  #   Executing break point "Person#initialize" at file.rb:4 in `initialize'
  #   irb(#<Person:0x292fbe8>):001:0> local_variables
  #   => ["name", "age", "_", "__"]
  #   irb(#<Person:0x292fbe8>):002:0> [name, age]
  #   => ["Random Person", 23]
  #   irb(#<Person:0x292fbe8>):003:0> [@name, @age]
  #   => ["Random Person", 23]
  #   irb(#<Person:0x292fbe8>):004:0> self
  #   => #<Person:0x292fbe8 @age=23, @name="Random Person">
  #   irb(#<Person:0x292fbe8>):005:0> @age += 1; self
  #   => #<Person:0x292fbe8 @age=24, @name="Random Person">
  #   irb(#<Person:0x292fbe8>):006:0> exit
  #   Executing break point "Person#name" at file.rb:9 in `name'
  #   irb(#<Person:0x292fbe8>):001:0> throw(:debug_return, "Overriden name")
  #   Name: Overriden name
  def breakpoint(id = nil, context = nil, &block)
    callstack = caller
    callstack.slice!(0, 3) if callstack.first["breakpoint"]
    file, line, method = *callstack.first.match(/^(.+?):(\d+)(?::in `(.*?)')?/).captures

    message = "Executing break point " + (id ? "#{id.inspect} " : "") +
              "at #{file}:#{line}" + (method ? " in `#{method}'" : "")

    if context then
      return handle_breakpoint(context, message, &block)
    end

    Binding.of_caller do |binding_context|
      handle_breakpoint(binding_context, message, &block)
    end
  end

  def handle_breakpoint(context, message, &block) # :nodoc:
    catch(:debug_return) do |value|
      if not use_drb? then
        puts message
        IRB.start(nil, IRB::WorkSpace.new(context))
      else
        @drb_service.add_breakpoint(context, message)
      end

      block.call if block
    end
  end
  private :handle_breakpoint

  # This asserts that the block evaluates to true.
  # If it doesn't evaluate to true a breakpoint will
  # automatically be created at that execution point.
  #
  # You can disable assert checking by setting 
  # Breakpoint.optimize_asserts to true before
  # loading the breakpoint.rb library. (It will still
  # be enabled when Ruby is run via the -d argument.)
  #
  # Example:
  #   person_name = "Foobar"
  #   assert { not person_name.nil? }
  def assert(context = nil, &condition)
    return if Breakpoint.optimize_asserts and not $DEBUG
    return if yield

    callstack = caller
    callstack.slice!(0, 3) if callstack.first["assert"]
    file, line, method = *callstack.first.match(/^(.+?):(\d+)(?::in `(.*?)')?/).captures

    message = "Assert failed at #{file}:#{line}#{" in `#{method}'" if method}. " +
              "Executing implicit breakpoint."

    if context then
      return handle_breakpoint(context, message)
    end

    Binding.of_caller do |context|
      handle_breakpoint(context, message)
    end
  end

  # Whether asserts should be ignored if not in debug mode.
  # Debug mode can be enabled by running ruby with the -d
  # switch or by setting $DEBUG to true.
  attr_accessor :optimize_asserts
  self.optimize_asserts = false

  class DRbService
    class FinishedException < Exception; end

    include DRbUndumped

    def initialize
      @breakpoint = @result = nil
      @has_breakpoint = @is_done = false
    end

    def add_breakpoint(context, message)
      workspace = IRB::WorkSpace.new(context)
      workspace.extend(DRbUndumped)

      @breakpoint = [workspace, message]
      @has_breakpoint = true

      until @is_done; end
      @is_done = false
    end

    def handle_breakpoint(&block)
      until @has_breakpoint; end
      @has_breakpoint = false

      #begin
      yield(@breakpoint)
      #rescue FinishedException
      #end

      @is_done = true
    end
  end

  # Will run Breakpoint in DRb mode. This will spawn a server
  # that can be attached to via the [ TODO: command ] command
  # whenever a breakpoint is executed. This is useful when you
  # are debugging CGI applications or other applications where
  # you can't access debug sessions via the standard input and
  # output of your application.
  #
  # You can specify an URI where the DRb server will run at.
  # This way you can specify the port the server runs on. The
  # default URI is druby://localhost:42531.
  #
  # Please note that breakpoints will be skipped silently in
  # case the DRb server can not spawned. (This can happen if
  # the port is already used by another instance of your
  # application on CGI or another application.)
  def activate_drb(uri = 'druby://localhost:42531')
    @use_drb = true
    @drb_service = DRbService.new
    DRb.start_service(uri, @drb_service)
  end

  def use_drb?
    @use_drb == true
  end
end

module IRB
  def IRB.start(ap_path = nil, main_context = nil, workspace = nil)
    $0 = File::basename(ap_path, ".rb") if ap_path

    # suppress some warnings about redefined constants
    old_verbose, $VERBOSE = $VERBOSE, nil
    IRB.setup(ap_path)
    $VERBOSE = old_verbose

    if @CONF[:SCRIPT] then
      irb = Irb.new(main_context, @CONF[:SCRIPT])
    else
      irb = Irb.new(main_context)
    end

    if workspace then
      irb.context.workspace = workspace
    end

    @CONF[:IRB_RC].call(irb.context) if @CONF[:IRB_RC]
    @CONF[:MAIN_CONTEXT] = irb.context

    trap("SIGINT") do
      irb.signal_handle
    end
    
    catch(:IRB_EXIT) do
      irb.eval_input
    end
  end

  class << self; alias :old_CurrentContext :CurrentContext; end
  def IRB.CurrentContext
    if old_CurrentContext.nil? and Breakpoint.use_drb? then
      result = Object.new
      def result.last_value; end
      return result
    else
      old_CurrentContext
    end
  end

  class Context
    alias :old_evaluate :evaluate
    def evaluate(line, line_no)
      if line.chomp == "exit" then
        exit
      else
        old_evaluate(line, line_no)
      end
    end
  end

  class WorkSpace
    alias :old_evaluate :evaluate

    def evaluate(*args)
      if Breakpoint.use_drb? then
        result = old_evaluate(*args)
        result.extend(DRbUndumped) rescue nil
        return result
      else
        old_evaluate(*args)
      end
    end
  end
end

class DRb::DRbObject
  undef :inspect
end

def breakpoint(id = nil, &block)
  Binding.of_caller do |context|
    Breakpoint.breakpoint(id, context, &block)
  end
end

def assert(&block)
  Binding.of_caller do |context|
    Breakpoint.assert(context, &block)
  end
end
breakpoint_client.rb (789 Bytes, text/x-ruby)
require 'breakpoint'

if ARGV[0] == "--help" then
  puts "This tool lets you connect to a breakpoint service ",
       "which was started via Breakpoint.activate_drb.",
       "",
       "Usage: ruby #{$0} [drb uri]",
       "",
       "The drb uri defaults to druby://localhost:42531"

  exit
end

uri = ARGV[0] || 'druby://localhost:42531'

DRb.start_service

begin
  service = DRbObject.new(nil, uri)
  loop do
    begin
      service.handle_breakpoint do |(workspace, message)|
        puts message
        IRB.start(nil, nil, workspace)
      end
    rescue Breakpoint::DRbService::FinishedException
    end
  end
rescue Exception => error
  puts "No connection to breakpoint service at #{uri}:",
       "  (#{error})",
       "  Reconnecting in 10 seconds..."
  sleep 10
  retry
end

In This Thread

Prev Next