[#121969] Make test-all vs Rubicon — "Booker C. Bense" <bbense+comp.lang.ruby.Nov.30.04@...>
[#121980] SOT gmail invites — Lyndon Samson <lyndon.samson@...>
X % of the people of this list appear to be using GoogleMail, where X
On 2004-11-30 19:26:08 -0800, Lyndon Samson <lyndon.samson@gmail.com> said:
On Thu, 2 Dec 2004 02:17:45 +0900, Steve Zich >
i've got 3 left...
I'd take one,
On Thu, 2 Dec 2004 02:58:33 +0900, you wrote:
On Thu, 2 Dec 2004 03:57:19 +0900, tony summerfelt
I've got some, too...
Ok, who missed out, I've got a couple left.
I have ~80 left if some people missed out. Message me privately if you
Am Do, 2004-12-02 um 05.34 schrieb Daniel Hobe:
Lyndon Samson wrote:
On Thu, 2 Dec 2004 12:34:29 +0900, Jamis Buck <jamis_buck@byu.edu> wrote:
On Mon, 6 Dec 2004 21:43:47 +0900,
On Thu, 2 Dec 2004 12:34:29 +0900,
Stefan Schmiedl wrote:
Jamis Buck wrote:
Carl Youngblood wrote:
Hans Fugal wrote:
Carl Youngblood wrote:
Hans Fugal wrote:
Carl Youngblood wrote:
> One of the most innovative things that Gmail does is organize your
[#122069] Rails with webrick slow as snails — Sarah Tanembaum <sarahtanembaum@...>
I've followed the sample installation
> BUT
David Heinemeier Hansson wrote:
Hello Sarah,
Lothar Scholz wrote:
under windows it seems to be very important to use rubyw.exe and not
[#122095] No-nonsense guide to Use Cases? — Lyle Johnson <lyle.johnson@...>
All,
[#122109] Ruby Graphing/chart libraries? — "Chris Williams" <cwillia1@...>
Hi all,
[#122110] ordered hash ? — "itsme213" <itsme213@...>
Is there a pure-ruby ordered hash? I'm looking for something that will
On Thu, 2 Dec 2004 09:37:44 +0900, itsme213 <itsme213@hotmail.com> wrote:
Hi,
Hi,
* itsme213 <itsme213@hotmail.com> [Dec 02, 2004 14:00]:
On Thu, 2 Dec 2004 23:37:34 +0900, Nikolai Weibull
[#122123] Accessing class constants from within a module? — Jos Backus <jos@...>
Any idea how I can access a class constant from within a module when that
On Thu, 2004-12-02 at 13:00 +0900, Jos Backus wrote:
[#122136] Does Ruby have anything like isprint? — mkcon@... (Martin Kahlert)
Hi!
[#122140] DamageControl - Continuous Integration Server in Ruby — aslak hellesoy <aslak.hellesoy@...>
Hi Rubyists,
[#122150] What do you use Ruby for? — coke <coke2k5@...>
What do you use Ruby for is my question.Me,being 17 I have lots of
[#122156] Does anyone have benchmark programs for YARV? — SASADA Koichi <ko1@...>
Hi,
SASADA Koichi wrote:
SASADA Koichi ha scritto:
gabriele renzi ha scritto:
gabriele renzi ha scritto:
Hi,
[#122163] Ruby Central, Inc. Codefest Grant Program — "David A. Black" <dblack@...>
Ruby Central, Inc. is pleased to announce its first...
David A. Black wrote:
[#122177] nested defs, what if... — Hugh Sasse Staff Elec Eng <hgs@...>
This is too half-baked to be an RCR, but here goes...
On Thu, 2 Dec 2004 23:44:08 +0900, Hugh Sasse Staff Elec Eng
On Thu, 2 Dec 2004 23:57:09 +0900
On Thursday 02 December 2004 12:22 pm, Brian Schr旦der wrote:
Hi,
On Friday, December 3, 2004, 1:47:32 PM, nobu wrote:
Hi,
[#122180] Net::SSH 0.6.0 — Jamis Buck <jamis_buck@...>
Here's another release of Net::SSH, your friendly neighborhood pure-Ruby
Jamis Buck wrote:
James Britt wrote:
Jamis Buck wrote:
James Britt wrote:
Jamis Buck wrote:
James Britt wrote:
[#122181] FXRuby-1.2.2 fails to compile — Stefan Lang <langstefan@...>
I compiled and installed fox-1.2.11 on my SUSE-Linux machine.
[#122194] figuring out what platform i'm on — aslak hellesoy <aslak.hellesoy@...>
Can anyone tell me how I can figure out from Ruby what platform I'm
[#122224] any way to manipulate variables and bindings? — "itsme213" <itsme213@...>
def foo
[#122269] DBC for C 1.3.0 released — Charles Mills <cmills@...>
This is a very high quality release thanks to Sebastian Hunt and Marc
[#122288] Ruby documentation. — Adam Fabian <afabian@...>
I'm kind of getting the impression that Ruby might not be
Hi --
On Fri, Dec 03, 2004 at 10:56:56AM +0900, David A. Black scribed:
David G. Andersen wrote:
On Thursday 02 December 2004 11:07 pm, J. D. wrote:
On Sat, 4 Dec 2004 13:17:07 +0900, Dave Thomas <pragdave@gmail.com> wrote:
Hi Adam,
Nicholas Van Weerdenburg wrote:
[#122291] sections-patch — Michael Neumann <mneumann@...>
Hi,
[#122296] How to introduce Ruby to more people. — "bin liu" <ruby@3cn.com.cn>
Ruby in our country is strangeness,many people even have not hear about it.
[#122298] Ruby + FastCGI + Apache2 + Debian Sarge — "J. D." <jd@...>
Hi,
[#122312] * usage — "trans. (T. Onoma)" <transami@...>
I've come across this a few times now and don't understand why its a syntax
[#122318] IRB + Windows + German keyboard = no square brackets — "martinus" <martin.ankerl@...>
Hi, I am having a problem with IRB in windows: I simply cannot enter
[#122344] Tk mouse events and keys — "R. Mark Volkmann" <mark@...>
I'm using the following code to detect a left mouse click.
If I have an item on a TkCanvas such as a Rectangle, is there a way to hide
[#122350] Crosswords (#10) — Ruby Quiz <james@...>
The three rules of Ruby Quiz:
Here is my solution. This took a few more LOC than I expected.
I originally thought I would have my solution work in two passes--the first,
[#122359] OT: good chat client? — "itsme213" <itsme213@...>
which one would you recommend? sorry for the noise, but it is primarily for
[#122367] about ruby multithreading — Lionel Thiry <lthiryidontwantspam@...>
Hello!
On Dec 3, 2004, at 9:47 AM, Lionel Thiry wrote:
James Edward Gray II wrote:
On 03 Dec 2004, at 08:12, Michael Neumann wrote:
[#122371] GC run at end of script execution - order in which objects are claimed? — Tilman Sauerbeck <tilman@...>
Hi,
Hi,
Yukihiro Matsumoto <matz@ruby-lang.org> [2004-12-03 17:21]:
>>>>> "T" == Tilman Sauerbeck <tilman@code-monkey.de> writes:
ts <decoux@moulon.inra.fr> [2004-12-03 17:21]:
[#122396] Multiple Ensure Blocks — gjenkins@... (Graham Jenkins)
I'm considering raising an RCR: "allow multiple ensure blocks". I've
[#122416] *sigh* Anyone having wireless working on a linux machine? — "Abraham Vionas" <abe_ml@...>
I've tried something like eight different distributions and the best I've
Abraham Vionas wrote:
They're right, it's off-topic. But there's likely a local linux user's
[#122435] Base64 packing question — John Sands <sandspace@...>
I'm packing up a file into an e-mail attachment using base64 encoding
[#122444] Using yield — "Joe Van Dyk" <joe.vandyk@...>
I come from a heavy C++ background, discovered Ruby a few months ago and
On Sat, 4 Dec 2004 09:32:39 +0900
Robert Klemme wrote:
[#122469] "make test" bombs for stable snapshot — Francis Hwang <sera@...>
Hi,
[#122471] Possible opportunity for Rails development — James Britt <jamesUNDERBARb@...>
I don't think this has come up here before, but Dave Winer is looking
Are there people saying this could be done in any other language
[#122475] Ruby 2.0 — "Joe Van Dyk" <joe.vandyk@...>
When is Ruby 2.0 due? Or estimated due date?
Brian Mitchell <binary42@gmail.com> wrote
William James wrote:
> 32.times{|y|print" "*(31-y),(0..y).map{|x|~y&x>0?" .":" A"},$/}
Giovanni Intini wrote:
Is this an example of a Sierpinski Triangle?
On Mon, 6 Dec 2004 12:23:06 +0900, Lyndon Samson
Brian Mitchell wrote:
Mauricio Fern疣dez wrote:
[#122482] Hash#eql? and Hash key testing — Joel VanderWerf <vjoel@...>
[#122495] Ideas — Lyndon Samson <lyndon.samson@...>
I'm working on a little app I call RAF ( Radar and Folio ), mostly as
[#122505] Ruby CVS Commit Mailinglist — Michael Neumann <mneumann@...>
Hi,
[#122522] Ruby CVS IRC bot, and Ruby CVS RSS feed — David Ross <dross@...>
Hello fellow rubists,
>
James Britt wrote:
Is there a way to get the name of the symbol passed to a method?
[#122527] OpenSSL bus error if no args to PKey::RSA.new, bug? — Sam Roberts <sroberts@...>
uname -a
[#122533] mkmf problems — Stu <ceaser@...>
[#122536] openssl request - don't hardcode PKCS1 padding (and some docs) — Sam Roberts <sroberts@...>
I want to do unpadded RSA operations with openssl, but I discovered that
[#122538] Obtaining mode information on a File object — Jos Backus <jos@...>
Another question... How do I access the File open mode ("w" in this case) on a
In article <20041204195115.GA83981@lizzy.catnook.com>,
[#122602] Uninstall Gems — "trans. (T. Onoma)" <transami@...>
What's the proper way to uninstall RubyGems?
On Mon, 6 Dec 2004 02:32:51 +0900, trans. (T. Onoma)
On Mon, Dec 06, 2004 at 08:32:30AM +0900, Chad Fowler wrote:
On Tue, Dec 07, 2004 at 06:56:02PM +0900, Mauricio Fern疣dez wrote:
On Saturday 11 December 2004 12:36 pm, Mauricio Fern疣dez wrote:
On Sun, 12 Dec 2004 03:15:18 +0900, Jim Weirich <jim@weirichhouse.org> wrote:
[#122619] patch to "make def return something useful" — Peter <Peter.Vanbroekhoven@...>
In RCR 277 it is proposed to have def return something useful, more
On Mon, 6 Dec 2004 09:39:43 +0900, Peter
> A Method still isn't good, because you can't easily get the name of
Hi,
Peter <Peter.Vanbroekhoven@cs.kuleuven.ac.be> wrote:
[#122630] Freezing Variable Assignment — Nicholas Van Weerdenburg <vanweerd@...>
Hi,
On Tue, 7 Dec 2004 12:07:32 +0900, itsme213 <itsme213@hotmail.com>
On Tue, 7 Dec 2004 13:44:09 +0900, Austin Ziegler <halostatue@gmail.com> wrote:
On Wed, 8 Dec 2004 00:40:15 +0900, Nicholas Van Weerdenburg
On Wed, 8 Dec 2004 01:06:53 +0900, Austin Ziegler <halostatue@gmail.com> wrote:
On Wed, 8 Dec 2004 03:13:07 +0900, Nicholas Van Weerdenburg
Hi Austin,
On 08 Dec 2004, at 13:12, Nicholas Van Weerdenburg wrote:
"David A. Black" <dblack@wobblini.net>
Hi --
On Sat, 11 Dec 2004 12:33:51 +0900, David A. Black <dblack@wobblini.net> wrote:
[#122644] Signatures and one liners — Brian Mitchell <binary42@...>
readers.each{|x| puts "Hi #{x},"}
Hi,
http://developers.slashdot.org/developers/04/12/06/1158251.shtml?tid=156&tid=1
CT wrote:
Am Dienstag, 7. Dezember 2004 01:52 schrieb David Ross:
Stefan Lang wrote:
Am Dienstag, 7. Dezember 2004 13:03 schrieb David Ross:
One of the sidethreads on the Slashdot article discuss Ruby having
On Mon, 6 Dec 2004 14:37:26 +0900, Brian Mitchell <binary42@gmail.com> wrote:
[#122645] Duck images — "Dave Burt" <dave@...>
Hi,
In article <vcSsd.61264$K7.35690@news-server.bigpond.net.au>,
On Monday 06 December 2004 12:52 pm, Phil Tomson wrote:
0>
shouldn't that be:
Michael DeHaan wrote:
On Tue, 7 Dec 2004 07:00:10 +0900
I am having the worst time getting these cute little things to work.
[#122651] quoting YAML — Joel VanderWerf <vjoel@...>
[#122695] Read comp.lang.ruby through Google Groups — Edgardo Hames <ehames@...>
Have any of you tried reading the messages to ruby-talk through Google Groups?
[#122696] Ruby Article at Linux Journal — pat eyler <pat.eyler@...>
Hey, it looks like our own Ara Howard has been busy. He's got a cool
pat eyler wrote:
Henrik Horneber <ryco@gmx.net> wrote in news:41B4A767.5090103@gmx.net:
Kaspar Schiess wrote:
" it is some kind of
On 10 Dec 2004, at 14:51, Michael DeHaan wrote:
Ironically I thought about this (the Swiss Army Laser Scalpel) on the way home.
[#122705] Gui programming example — Aquila <braempje@...>
I'm absolutely new to ruby but I can program in a lot of other languages. To
[#122750] COM with Ruby — Justin Rudd <justin.rudd@...>
I know about Win32Ole for accessing COM objects, but what about
[#122756] Ruby (quiz?) simulation idea — Hal Fulton <hal9000@...>
This is just off the top of my head. I thought I'd post it instead of
On Dec 6, 2004, at 7:25 PM, Hal Fulton wrote:
On Tue, 7 Dec 2004 23:25:07 +0900
[#122768] Re: [rcr] String#split behaves odd — "Pe, Botp" <botp@...>
Yukihiro Matsumoto [mailto:matz@ruby-lang.org] wrote:
Hi,
On Tuesday 07 December 2004 12:31 am, Yukihiro Matsumoto wrote:
[#122775] Recommened readings? — "John" <jtrunek@...>
For one of my university courses, I have to complete a paper on Ruby.
John wrote:
James Britt wrote:
On Wed, 8 Dec 2004 05:07:31 +0900, John Trunek <jtrunek@hotmail.com> wrote:
[#122782] Ruby Weekly News 29th Nov - 5th Dec 2004 — timsuth@... (Tim Sutherland)
http://www.rubygarden.org/ruby?RubyNews/2004-11-29
"Tim Sutherland" <timsuth@ihug.co.nz> wrote...
druby://whytheluckystiff.net:6503
[#122798] Idiom for creating hash from two arrays — Jonathan Paisley <jp-www@...>
Hello all,
On Wed, 08 Dec 2004 05:43:42 +0900, trans. (T. Onoma) wrote:
Jonathan Paisley wrote:
Hi --
David A. Black wrote:
Hi --
[#122841] libxml2 — Mikael Larsson <mikael.x.larsson@...2.se>
Hi
On Wed, 08 Dec 2004 05:16:29 +0900, Mikael Larsson wrote:
[#122875] Re: [rcr] String#split behaves odd — "Pe, Botp" <botp@...>
Ryan Davis [mailto:ryand-ruby@zenspider.com] wrote:
Hi,
On Wednesday 08 December 2004 12:00 am, Yukihiro Matsumoto wrote:
On 2004-12-08 15:56:01 +0900, trans. (T. Onoma) wrote:
On Wednesday 08 December 2004 10:00 am, Florian Frank wrote:
trans. (T. Onoma) wrote:
On Thursday 09 December 2004 08:19 am, Glenn Parker wrote:
++ trans. (T. Onoma) [ruby-talk] [10/12/04 00:43 +0900]:
On Thursday 09 December 2004 12:29 pm, Ibraheem Umaru-Mohammed wrote:
Hi --
On Thursday 09 December 2004 02:04 pm, David A. Black wrote:
On Wed, 8 Dec 2004 15:56:01 +0900, trans. (T. Onoma)
On Wednesday 08 December 2004 07:42 am, Austin Ziegler wrote:
On Fri, 10 Dec 2004 03:10:20 +0900, trans. (T. Onoma) <transami@runbox.com>
[#122884] RubyGems 0.8.3 Released! — Jim Weirich <jim@...>
= Announce: RubyGems Release 0.8.3
[#122918] RubyScript2Exe 0.2.0 — "Erik Veenstra" <pan@...>
On Thu, Dec 09, 2004 at 01:22:30AM +0900, itsme213 wrote:
On Dec 8, 2004, at 10:57 AM, Mauricio Fern疣dez wrote:
[#122924] Ruby/Extensions v0.6.0 — Gavin Sinclair <gsinclair@...>
I am pleased to announce the release of v0.6.0 of Ruby/Extensions
Gavin Sinclair wrote:
On Thursday, December 9, 2004, 1:22:29 AM, Florian wrote:
[#122934] RPA completion for bash: 12/08/04 — Brian =?ISO-8859-15?Q?Schr=F6der?= <ruby@...>
Announcing a new version of programmatical completion for bash.
[#122939] Getting Rails to work on WinXP — Robo <robo@...>
I'm trying to the 10min Setup video tutorial, but the video's slightly
[#122983] Overloading a module method? — "Dominik Werder" <dwerder@...>
I'm having a headache while trying to achive something like this:
[#123005] binding question — email55555 email55555 <email55555@...>
I have this example codes:
Hi Eric,
I am learning Tk from the book "Practical Programming in Tcl and Tk".
[#123019] "RSS, Ruby, and the Web" is an article in this month's Dr. Dobb's Journal... — "Tom Copeland" <tom@...>
...by Dave Thomas, may his beard never fall out! If he has one, that
meh...have to register to read it...
[#123026] Someone, Aredridel has invited you to open a Google mail account — Aredridel <aredridel@...>
I've been using Gmail and thought you might like to try it out. Here's
u still have invites? could i have one if u still have?
[#123031] Something like Nuke? — steven_todd_harris@...
I looked at rails (very cool) but I was wondering if their is something
[#123076] Crosswords (#10) — Ruby Quiz <james@...>
The summary for this week's quiz should be:
Hello James,
On Dec 9, 2004, at 8:55 AM, Brian Schrer wrote:
On Fri, 10 Dec 2004 00:47:09 +0900
On Thursday 09 December 2004 10:52 am, Brian Schr=C3=B6der wrote:
[#123077] Tk dialogs — "R. Mark Volkmann" <mark@...>
How can I add widgets like TkEntry to a TkDialog? I've written a class that
----- Original Message -----
[#123137] Want to Write a Book? — Dave Thomas <dave@...>
Gentle Ruby folk:
Michael,
itsme213 wrote:
On Fri, Dec 10, 2004 at 10:52:18AM +0900, Dave Thomas scribed:
David G. Andersen wrote:
[#123141] FTTreeList example? — scott_mccaskill@... (Scott McCaskill)
I've been pouring over FTTreeList for some time now, trying to figure
[#123149] Is there any project like Zope or Plone? — "bin liu" <ruby@3cn.com.cn>
Is there any project like Zope or Plone in Ruby except Rails?
[#123160] adding object attributes — Artur Merke <merke@...>
Hi
[#123179] Nitro 0.6.0 — "George Moschovitis" <george.moschovitis@...>
Hello everyone,
[#123189] Learning Tic-Tac-Toe (#11) — Ruby Quiz <james@...>
The three rules of Ruby Quiz:
On Fri, 10 Dec 2004 23:29:02 +0900
On Dec 10, 2004, at 9:19 AM, Brian Schrer wrote:
On Sat, 11 Dec 2004 00:42:04 +0900
On Dec 10, 2004, at 10:11 AM, Brian Schrer wrote:
On Sat, 11 Dec 2004 01:22:30 +0900
On Dec 10, 2004, at 1:42 PM, Brian Schrer wrote:
On Sat, 11 Dec 2004 04:54:04 +0900
On Dec 10, 2004, at 2:15 PM, Brian Schrer wrote:
On Friday 10 December 2004 03:23 pm, James Edward Gray II wrote:
On Dec 10, 2004, at 2:44 PM, trans. (T. Onoma) wrote:
Has anyone tried a genetic programming approach? I have tried it, but
It would be good to be able to play against eachother when this is all
On Sun, 12 Dec 2004 04:12:28 +0900
Brian Schrer wrote:
[#123195] iconv replacement for windows? — Thomas Leitner <t_leitner@...>
Hi,
On Sat, 11 Dec 2004 00:45:11 +0900
Thomas Leitner wrote:
On Sat, 11 Dec 2004 05:22:38 +0900, Austin Ziegler
On Sunday, December 12, 2004, 7:12:34 AM, Stu wrote:
[#123197] A neat article on Rails performance... — Tom Copeland <tom@...>
...using various session storage containers is here:
[#123209] IOWA book ideas — Stefan Schmiedl <s@...>
Hi everybody.
[#123222] How to make a deep copy of an object (Searching for Idiom) — Brian =?ISO-8859-15?Q?Schr=F6der?= <ruby@...>
Hello Group,
[#123275] Thread.critical and segfaults calling into Ruby callbacks from C — leon breedt <bitserf@...>
hi,
On 10 Dec 2004, at 22:27, leon breedt wrote:
[#123276] fsync on stdout for mod_rewrite — Eric Anderson <eric@...>
I have a script that I want to ensure has flushed stdout after ever line
[#123278] Bridging DRb UNIX socket services on two hosts — Ilmari Heikkinen <kig@...>
Hi,
[#123309] How can I get the return value from a Ruby function, but inside the set_trace_func callback? — Stephen Kellett <snail@...>
Hi folks,
[#123317] puts / print as method not keyword? — zuzu <sean.zuzu@...>
so, i'm thinking about language design with a particular interest in
On Sun, 12 Dec 2004 05:23:10 +0900, Ilmari Heikkinen <kig@misfiring.net> wrote:
la, 2004-12-11 kello 22:38, zuzu kirjoitti:
On Sun, 12 Dec 2004 06:23:06 +0900, Ilmari Heikkinen <kig@misfiring.net> wrote:
[#123351] Find every location of "th" in string. — "William James" <w_a_x_man@...>
Find location of every "th" in "the thin man thinks".
Thanks. The scan method seems the way to go.
[#123369] ruby/SDL question — Ferenc Engard <ferenc@...>
Hi all!
[#123370] Avoiding if requires type mutation -- evil.rb? — Mikael Brockman <mikael@...>
I am writing a tree editor. The algorithm for displaying a node is
[#123379] Writing GUI's in Ruby — "Hobby Racer" <none@...>
I'm new to Ruby and I am looking for a list of "main stream" libraies for
[#123407] Problem building wxRuby: htmlproc.h not found — Andreas Schwarz <usenet@...>
I'm trying to build wxRuby 6.0 on Linux (Ubuntu). When I run make I get
[#123411] Ruby vs. Python vs. Perl — Michael McGarry <replytogroup@...>
Hi,
[#123424] FreeRIDE 0.9.2 - The Free Ruby IDE — Laurent Julliard <laurent@...>
Version 0.9.2 of FreeRIDE has been released and is available for download!
Laurent Julliard ha scritto:
[#123426] Any bug/issue trackers written in Ruby? — "J. D." <jd@...>
Hi,
I've been working on bug tracking system for sometime. This is the URL
On Mon, 13 Dec 2004 14:17:58 +0900, Kent Sibilev <ksibilev@bellsouth.net> wrote:
Thanks. There are definitely a lot of things missing but I spent only
[#123454] Abstracts and Interfaces in Ruby? — Miles Keaton <mileskeaton@...>
What's the recommended Ruby way to do abstract classes and abstract methods?
On Mon, 13 Dec 2004 15:20:26 +0900, Miles Keaton <mileskeaton@gmail.com> wrote:
[#123470] ming-ruby question — George Moschovitis <gm@...>
Hello everyone,
[#123481] Help writing a each_unique method — "trans. (T. Onoma)" <transami@...>
I have this method:
[#123491] Hash freezes String keys are returns copy — Michael Neumann <mneumann@...>
Hi,
>>>>> "M" == Michael Neumann <mneumann@ntecs.de> writes:
ts wrote:
[#123500] Wiki Spam Report — "Jim Weirich" <jim@...>
Wiki Spam Report
[#123504] Thread and HTTP troubles — Keegan Dunn <theweeg@...>
I'm trying to write a threaded program that will run through a list of
[#123551] win32-thread 0.0.1 (or, do you feel lucky?) — "Daniel Berger" <djberg96@...>
Hi all,
[#123553] Unicode in Ruby and a Ruby Reference — Mike McGavin <iizogii@...>
Hi everyone.
Hi,
[#123558] Ruby Weekly News 6th - 12th December 2004 — timsuth@... (Tim Sutherland)
http://www.rubygarden.org/ruby?RubyNews/2004-12-06
[#123563] Mixin questions — "Johan Nilsson" <johan.nilsson@...>
Hi,
[#123587] Implementing Genetic algorithm in Ruby — Robo <robo@...>
Hi, I took an interest in genetic algorithm after reading this article:
[#123590] wxRuby and other GUI toolkits — Nick <devel@...>
Any chance you could provide a simplified interface along the lines
Then why not gravitate toward FXRuby?
Richard Lyman wrote:
FXRuby and FOX are actually LGPL'd (if that makes a difference to
Richard Lyman wrote:
[#123614] Apache2, FastCGI and Rails on Windows — "Williams, Chris" <Chris.Williams@...>
I've been running around in circles trying to enable FastCGI on my rails
I'm running my rails application on the same environment and it works
Kent Sibilev wrote:
Oh, This is quite easy. I assume you have Ruby and RubyForApache
Hi,
Joao Pedrosa ha scritto:
Kent Sibilev wrote:
[#123626] Ruby Wiki engine w/ability to upload files — Bil Kleb <Bil.Kleb@...>
Hello again,
I haven't found one either... I'd like one.
On Wed, Dec 15, 2004 at 06:07:45AM +0900, Michael DeHaan wrote:
Regarding the Ruwiki vs Instiki, etc -- do any support the idea of
[#123637] no-argument sort() — Alex Fenton <alex@...>
Hi
On Wed, Dec 15, 2004 at 07:02:16AM +0900, Alex Fenton wrote:
Mauricio Fern疣dez wrote:
In message "Re: no-argument sort()"
[#123638] 64-bit integers in Ruby/DL — Jamis Buck <jamis_buck@...>
Okay, you C gurus out there. Here's a stumper.
[#123661] rand.rb 0.9: Random access methods for Enumerables — Ilmari Heikkinen <kig@...>
Hello all, here's a little convenience library we whipped up a couple
Am Mittwoch, 15. Dezember 2004 01:24 schrieb Ilmari Heikkinen:
On Dec 14, 2004, at 7:24 PM, Ilmari Heikkinen wrote:
Neil Spring schreef:
On Wednesday 15 December 2004 05:12 pm, Maarten Boonen wrote:
trans. (T. Onoma) schreef:
[#123694] Re: [BUG] unknown node type 0 - SERIOUS ENOUGH TO MIGRATE AWAY FROM RUBY? — Andrew Walrond <andrew@...>
This is a long standing bug in Ruby, and has been reported hundreds of times
Andrew Walrond wrote:
Andrew Walrond wrote:
[#123702] Regex extraction — Scott Rubin <slr2777@...>
Hello,
[#123740] P2P application in 15 lines of Python posted on slashdot — slonik AZ <slonik.az@...>
Hi Everybody,
Michael DeHaan ha scritto:
* gabriele renzi <rff_rff@remove-yahoo.it> [Dec 16, 2004 10:30]:
On Thu, 16 Dec 2004 18:51:38 +0900
* Brian Schrer <ruby@brian-schroeder.de> [Dec 16, 2004 13:10]:
>>>>> "N" == Nikolai Weibull <mailing-lists.ruby-talk@rawuncut.elitemail.org> writes:
* ts <decoux@moulon.inra.fr> [Dec 16, 2004 14:30]:
[#123756] New Smalltalk Release — steven_todd_harris@...
I know this is a bit off topic but because ruby and smalltalk are so
[#123761] Kernel.local_variables question — Jos Backus <jos@...>
Consider
[#123794] Multi-events sequence binding? — email55555 email55555 <email55555@...>
It seems to me that Ruby/Tk does not support multi-events sequence binding ?
[#123804] Use of ruby in different areas I've not seen discussed here before? — Friedrich Dominicus <just-for-news-frido@...>
Of course I may have overreadi, but at least I can not remember having
[#123815] Ruby Cocoa (OS X) questions: deployment & interface builder — Michael DeHaan <michael.dehaan@...>
Folks,
Hello Michael,
Nick wrote:
> Would you consider adding your insights to the RubyGarden page I
[#123820] string to (valid) filename — "itsme213" <itsme213@...>
Don't know much about regexes or File/FileUtils, and am a bit stuck on what
[#123847] rubyqt, popen problem in a log viewer — Bauduin Raphael <rb@...>
Hi,
[#123850] CGI/session adds session_id in hidden fields — Patrick Gundlach <clr4.10.randomuser@...>
Dear all,
[#123852] Rails 0.9: Fast development, breakpoints, validations... — David Heinemeier Hansson <david@...>
Another huge upgrade with again close to 100 changes, additions, and
David Heinemeier Hansson wrote:
Hi --
The gem install gives a couple of new warnings aboud not finding
[#123857] "RSS, Ruby and the Web" in Jan. 2005 DDJ — Lyle Johnson <lyle.johnson@...>
I don't recall seeing this officially plugged yet, so I'll note that
Someone mentioned it already... but the problem is - you have to
[#123882] Re: Loading configuration files in an OS-agnostic way — "Gavri Savio Fernandez" <gavrif@...>
[#123898] Scrabble Stems (#12) — Ruby Quiz <james@...>
The three rules of Ruby Quiz:
Ruby Quiz wrote:
On Dec 18, 2004, at 3:42 PM, Glenn Parker wrote:
* Carlos <angus@quovadis.com.ar> [2004-12-19]:
[Julius Plenz <usenet@plenz.com>, 2004-12-19 21.37 CET]
[#123906] String expand problem — Wild Karl-Heinz <kh.wild@...>
hi.
Hi --
In message "String expand problem"
[#123916] utf-8 & Range under eruby (possibly Rails) problems — Johan Sensen <johans@...>
Hi,
[Johan Sensen <johans@gmail.com>, 2004-12-17 16.42 CET]
On Sat, 18 Dec 2004 03:20:41 +0900, Carlos <angus@quovadis.com.ar> wrote:
[#123930] grid manager with '-', 'x', '^' — email55555 email55555 <email55555@...>
Just curious about special char with grid manager:
[#123948] Ruby is like baby Alpaca yarn... — Jamis Buck <jamis_buck@...>
Just wanted to share this. I often talk with my wife about what I'm
[#123955] RMagick 1.7.0 — Tim Hunter <cyclists@...>
RMagick enters its 3rd year.
[#123968] Please advise...Install Ruby from Debian Package or Source? — Thursday <nospam@...>
I'd like to install Ruby on a Debian server.
[#123983] OT: vi useability question — Lothar Scholz <mailinglists@...>
Hello ruby-talk,
On Sun, Dec 19, 2004 at 08:07:28AM +0900, Lothar Scholz wrote:
Lothar Scholz wrote:
On Sun, Dec 19, 2004 at 08:07:28AM +0900, Lothar Scholz wrote:
Roeland Moors wrote:
Hans Fugal <fugalh@xmission.com> writes:
On Tue, 21 Dec 2004 04:36:24 +0900, Mikael Brockman <mikael@phubuh.org> wrote:
On Tue, 21 Dec 2004, Nicholas Van Weerdenburg wrote:
Hans Fugal wrote:
[#123999] FileUtils.cp_r - how to prune — "itsme213" <itsme213@...>
I am doing
[#124022] Ruby Coverage Validator — Stephen Kellett <snail@...>
Ruby Coverage Validator, a coverage tool for Ruby.
[#124044] RDoc Accents — James Edward Gray II <james@...>
I need to include an accented e in my rdoc documentation. é
On Mon, 20 Dec 2004 08:20:44 +0900, James Edward Gray II
Aredridel wrote:
On Dec 19, 2004, at 5:53 PM, James Britt wrote:
[#124051] Rails-Tutorial — Rene Paulokat <rene@...36.net>
hi,
Rene Paulokat wrote:
Tim Bates wrote:
> Is there any recent tutorials?
[#124052] threads and errors — "Charles Mills" <cmills@...>
What techniques are available for handling errors that occur in
[#124053] Programming Ruby 2nd Ed in Canada? — Kevin Proctor <K_Proctor@...>
Just a short question here, are there any Canucks that've found the new
[#124069] RMagick 1.7.0 for Windows -- requires X Windows server? — Sarah Tanembaum <sarahtanembaum@...>
Tim has helped me in installing RMagick 1.7.0 but as I want to try the
[#124071] Rublog Error — James Edward Gray II <james@...>
I'm trying to convert a blog I maintain for a friend to Rublog. I've
> http://www.grayproductions.net/cgi-bin/renas_blog.cgi
On Dec 20, 2004, at 5:22 AM, Robert McGovern wrote:
* James Edward Gray II <james@grayproductions.net> [2004-12-20 23:32:55 +0900]:
[#124085] Programatically resizing photos — ptkwt@... (Phil Tomson)
I find that Italy is a target-rich environment for taking pictures and
[#124098] Bug in String#rjust — Matt Mower <matt.mower@...>
Hi.
[#124110] Constructor question — "Han Holl" <han.holl@...>
[#124131] A RDoc template without frames — David Heinemeier Hansson <david@...>
Despite the snazzy look of the new default RDoc templates with three
> Regardless of which, I'd be terribly appreciative if anyone had the
I did a design up once for something without frames:
John W. Long wrote:
Ask and you shall receive:
John W. Long wrote:
> This copyright could be included in the generated templates. At the
> I'm not planning on copyrighting the design.
[#124140] Is there any ruby compatible graphics/imaging utilities ... — Sarah Tanembaum <sarahtanembaum@...>
that works under native mswin323232 or at least with Cygwin X windows
Sarah Tanembaum wrote:
[#124157] RedHanded: a new Ruby blog — why the lucky stiff <ruby-talk@...>
Hi, people. I've opened a new blog called RedHanded. See:
[#124175] Text::Hyphen 1.0.0 — Austin Ziegler <halostatue@...>
I just told you that I'm releasing Text::Hyphen 1.0.0, and here it is
Austin Ziegler wrote:
Austin Ziegler wrote (news:9e7db91104122108267c480511@mail.gmail.com):
[#124182] curses - how to use unicode — Simon Strandgaard <neoneye@...>
Yesterday I got xterm working with UTF-8. I had made an oneliner that
Simon Strandgaard <neoneye@gmail.com> wrote:
Simon Strandgaard <neoneye@gmail.com> wrote:
[#124198] Re: OT: vi useability question — "Pe, Botp" <botp@...>
Mikael Brockman [mailto:mikael@phubuh.org] wrote:
* "Pe?a, Botp" <botp@delmonte-phil.com> [1210 11:10]:
Dick Davies <rasputnik@hellooperator.net> writes:
On Tue, 21 Dec 2004 20:16:14 +0900, Dick Davies
Fredrik Jagenheim wrote:
On Friday 24 December 2004 11:45 am, Michael W Thelen wrote:
[#124237] Ruby for Pocket PC 2003 — Sarah Tanembaum <sarahtanembaum@...>
Well, I just got an ownership of iPAQ h1935 with Pocket PC 2003/Windows
[#124252] html form generation problems — Dennis Roberts <dennisr@...>
I think I must be doing something wrong. I am attempting to generate a
[#124258] Rake::PackageTask — Nicholas Van Weerdenburg <vanweerd@...>
Does Rake::PackageTask work on Windows?
[#124273] [job] translator/etc? — <ume@...>
I know this is way off topic, but I was wondering if anyone associated with
[#124283] Help 0.1: access ri from irb (using the ri library) — Ilmari Heikkinen <kig@...>
Bit the bullet and finished this little straggler.
Newbee question: where should I put help.rb?
[#124297] Ruby Extensions using OS X Frameworks — David Craine <dave@...>
I'm trying to write a ruby extension which accesses the
[#124299] ruby-dev summary 25045-25260 — Takaaki Tateishi <ttate@...>
Dear all,
[#124319] Re: implicit string concatenation — "Zsban Ambrus" <ambrus@...>
> irb(main):006:0> puts("foo"
[#124326] Digest::MD5 Resume? — "christoph.heindl@..." <christoph.heindl@...>
Hi,
[#124329] All I want to do is move a directory :( — "trans. (T. Onoma)" <transami@...>
Very frustrated. I have just spent well over an hour trying to do the simplest
trans. (T. Onoma) wrote:
On Wednesday 22 December 2004 04:25 pm, Gennady Bystritksy wrote:
I think the problem may be that the :force option isn't working correctly on
Hi,
[#124338] Inconsistency with IO.readlines — Justin Rudd <justin.rudd@...>
I've noticed a slight inconsistancy with IO.readlines depending on the
Hmm, don't know OS9 file format, but couldn't you set $/
# ========== ext/input_reader.rb ==========
Let me apologize in advance, because I've not bee following this
So I glanced at delegate in the past but never really used it. Today,
On Dec 23, 2004, at 11:57 PM, Matt Maycock wrote:
[#124375] program file name problem — email55555 email55555 <email55555@...>
A sample Tk program likes:
[#124391] Merry Christmas — Christian Neukirchen <chneukirchen@...>
:( I get
> On Friday 24 December 2004 08:21 am, Christian Neukirchen wrote:
CT wrote:
Michael Neumann <mneumann@ntecs.de> writes:
* Christian Neukirchen <chneukirchen@gmail.com> [1237 12:37]:
From my sister I got a handmade ruby shirt.
Simon Strandgaard <neoneye@gmail.com> writes:
[#124413] ruby 1.8.2 — Yukihiro Matsumoto <matz@...>
Merry Christmas,
Hello,
[#124416] non-OO realpath, basename, dirname? — David Garamond <lists@...6.isreserved.com>
Is there a better way than below? (Note: I don't want to implement
[#124439] HTML and CSS validation — Bil Kleb <Bil.Kleb@...>
What's the best method to automate the validation
Hi!
CT wrote:
You can do this with cURL (man curl), and I suppose one of the Ruby cURL
I personally like:
[#124460] Ruby X10 Software — Jim Weirich <jim@...>
Hi All.
[#124461] Revival of RubyInRuby? — Michael Neumann <mneumann@...>
Dear Rubyists,
[#124480] Web programming, need really good reference. — "Bob" <clarke@...>
I have started a large project (currently php/mysql) but at this early
[#124489] nttp<-->http test — Martin Pirker <crf@...>
from the funny-things-people-do-with-Ruby dept.
[#124490] Namespaces, inverted — <eero.saynatkari@...>
Apologies if this topic has already been beaten to death.
[#124495] The RedCloth-3.0 regexp stack overflow: Copland manual — Bil Kleb <Bil.Kleb@...>
So I was following up on converting our FUN3D manual
[#124502] Ri bug in new 1.8.2 release — jim@...
Hi
* Dave Thomas <Dave@PragProg.com> [2004-12-27 14:12:47 +0900]:
OK, I just got this same error. ruby 1.8.2 on linux (somewhat updated
[#124504] Rubygem 0.8.3 not working with 1.8.2 — jim@...
Hi
[#124508] Long-Standing Bug in the Readline extension — Brent Roman <brent@...>
The Readline uses the the GNU readline library's event handling hook
Hi,
Hi,
[#124535] Nitro 0.7.0 + Og 0.7.0 — "George Moschovitis" <george.moschovitis@...>
Hello everyone,
[#124538] RubyScript2Exe 0.3.0 — "Erik Veenstra" <pan@...>
RubyScript2Exe 0.3.0 is out!
Hi Erik,
[#124562] split on '' (and another for split -1) — "trans. (T. Onoma)" <transami@...>
Here's a generic routine I'm working on:
["trans. (T. Onoma)" <transami@runbox.com>, 2004-12-27 20.31 CET]
On Monday 27 December 2004 03:33 pm, Carlos wrote:
[#124588] Gem Auto-Dependencies — Nicholas Van Weerdenburg <vanweerd@...>
Is there a flag to auto-install gem dependencies to allow for silent installs?
[#124591] Ruby Philosophy — Darren Crotchett <rubylang@...>
I'm trying to get a feel for the philosophical differences between Smalltalk,
Darren Crotchett ha scritto:
Darren Crotchett wrote:
Thursday ha scritto:
Measuring a language's performance is a difficult task. ML posts and suchlike.
Premshree Pillai ha scritto:
[#124596] Best ways to accelerate Ruby's popularity — Thursday <nospam@...>
I think Ruby's popularity is growing, but I can't help but wonder what
Hi all, I got to this discussion really late, but I have some ideas.
Ben Giddings wrote:
Joel VanderWerf wrote:
Hi,
Yukihiro Matsumoto wrote:
On Thu, 20 Jan 2005 03:14:28 +0900, Ben Giddings
ruby talk (AKA James Britt) wrote:
Ben Giddings (bg-rubytalk@infofiend.com) wrote:
On Thu, 20 Jan 2005 05:15:40 +0900, why the lucky stiff
why the lucky stiff ha scritto:
I think it's cool to have community-driven websites,
zimba.tm@gmail.com wrote:
HI --
David A. Black wrote:
Hi --
David A. Black wrote:
Ben Giddings <bg-rubytalk@infofiend.com> wrote:
Ben Giddings wrote:
In message <41F58CEF.70807@infofiend.com>, Ben Giddings
On Jan 28, 2005, at 9:38 PM, Ian Hobson wrote:
On Sat, 29 Jan 2005, Ian Hobson wrote:
David A. Black wrote:
> One indicator of the growth in Ruby's user base is the rise in the
David A. Black wrote:
James Britt wrote:
Curt Hibbs wrote:
> For example, if I'm clicking around a site, and the style suddenly
Douglas Livingstone wrote:
On Fri, 21 Jan 2005 12:51:18 +0900, James Britt
Douglas Livingstone wrote:
On Fri, 21 Jan 2005 14:21:39 +0900, James Britt
> Trust tends to come from a network effect. If I determine one site to
Douglas Livingstone wrote:
On Fri, 21 Jan 2005 13:28:58 +0900, James Britt
Douglas Livingstone wrote:
On Thu, 20 Jan 2005 04:52:42 +0900, Ben Giddings
James "ruby talk" Britt wrote:
Ben Giddings wrote:
As a recent adopter of Ruby I've gone through some of the pain of finding ruby
Re: ruby-doc.org
Ilmari Heikkinen wrote:
On Tue, 28 Dec 2004 10:10:42 +0000, Thursday wrote:
On Tuesday 28 December 2004 06:36 am, Neil Stevens wrote:
I'd like to see http://www.ruby-lang.org/en cleaned up to immediately
<disclaimer>
darren wrote:
On Thu, 30 Dec 2004 15:22:16 +0900, James Britt
Thursday ha scritto:
On Tue, 2004-12-28 at 11:36, gabriele renzi wrote:
On Wed, 29 Dec 2004 05:54:01 +0900, Tom Copeland <tom@infoether.com> wrote:
On Tue, 2004-12-28 at 16:00, Premshree Pillai wrote:
On Wed, 29 Dec 2004 06:12:25 +0900, Tom Copeland <tom@infoether.com> wrote:
On Tue, 2004-12-28 at 16:15, Premshree Pillai wrote:
Tom Copeland wrote:
On Tue, 2004-12-28 at 16:39, Zach Dennis wrote:
Ben Branders wrote:
Aquila - 30/12/04 16:29:
Ben Branders wrote:
James Britt wrote:
In article <41D44401.4060104@mktec.com>, Zach Dennis wrote:
Tim Sutherland wrote:
The reason I came to ruby was that it had regular expressions like perl so
On Thu, 6 Jan 2005 15:32:38 +0900, Trevor Andrade
On Thu, 6 Jan 2005 21:42:00 +0900, Austin Ziegler <halostatue@gmail.com> wrote:
Thursday wrote:
[#124607] help on making ruby code faster — David Garamond <lists@...6.isreserved.com>
I use 128bit GUID values a lot, and on my Guid class there's the
Hi! I have played a bit with your code, the result is now about 55%
[#124612] verifying a network connection — Thomas Metz <metz@...>
Hi,
Thomas Metz wrote:
Interesting... but it seems unncessarily complicated.
[#124635] Connecting to MySQL 4.1.x from Ruby on Windows XP — John Wilger <johnwilger@...>
Hello,
[#124642] Some methods don't work in WinXP? — "Bob" <clarke@...>
Do some methods / functions not work in the WinXP implementation?
[#124685] unit testing of methods which do Kernel#exit — Michal <lists+rubytalk@...>
Hi,
[#124689] Ruby USB Drive — Giovanni Intini <intinig@...>
For Christmas I got a wonderful present: a 1GB USB drive. Now I feel
[#124724] unusual rake behaviour — Yogi <yogi.kulkarni@...>
Hello all!
On 29 Dec 2004, at 13:28, Jim Weirich wrote:
On Thursday 30 December 2004 03:06 am, Eric Hodel wrote:
[#124726] ruby leaks on "special" use of include — Stefan Lang <langstefan@...>
Just tried to do some fancy (probably inappropriate)
[#124736] rdoc in rails — Roeland Moors <roelandmoors@...>
Would it be difficult (possible) to make a generator for rdoc that
> Would it be difficult (possible) to make a generator for rdoc that
On Thu, Dec 30, 2004 at 04:48:14AM +0900, David Heinemeier Hansson wrote:
[#124741] Distributed application — "Luis G. Gez" <lgomez@...>
Hello all,
[#124746] #send and private methods — Brian Palmer <brian@...>
I apologize if this has been discussed before and I missed it...
[#124762] Re: unusual rake behaviour — Dave Halliday <davehal02@...>
I checked CVS. There is a recent (Dec. 19) change made by Nobu to
[#124782] rubytorrent — William Morgan <wmorgan-ruby-talk@...>
Hi all,
[#124795] seeking hints for fast io — jm <jeffm@...>
I have a class which holds data while it's being manipulated. The
[#124805] Inheritance of class variables — "Eustaquio Rangel de Oliveira Jr." <eustaquiorangel@...>
Hello there.
>>>>> "E" == Eustaquio Rangel de Oliveira <eustaquiorangel@yahoo.com> writes:
[#124807] attr / attr_accessor — Markus Werner <markus.werner@...>
Hi Ruby Folk,
[#124820] Ruby X10 Interface to Firecracker CM17A — "Jim Weirich" <jim@...>
I've got my first cut at a Ruby interface to the CM17A firecracker X10
Jim Weirich wrote:
[#124821] GUI toolkit which separates UI specification from driving logic — Gavri Fernandez <gavri.fernandez@...>
Hi,
[#124847] Finding out what row DBI chokes on? — Francis Hwang <sera@...>
Some times I deal with a legacy table with screwy datetime info, so you
[#124899] Ruby and Smalltalk like environment? —
Hi there,
Lothar Scholz wrote:
[#124901] Cryptograms (#13) — Ruby Quiz <james@...>
The three rules of Ruby Quiz:
DISCUSSION CONTAINS SPOILERS
Michael C. Libby wrote:
Glenn Parker wrote:
Florian Gross wrote:
Re: Best way to debug ruby+fastcgi?
J. D. wrote: > What is the best way to debug fastcgi scripts? Remote breakpoints might be a good option here -- they let you connect an irb shell to any given point of your application meaning you can just use Ruby's regular introspection facilities to have a look at local variables, instance variables, call traces, methods and modify Object altogether. Attached to this mail you will find the latest mostly stable version which will turn into a release soon. If everything goes well this should be merged back into dev-utils and be available in Ruby On Rails with a few nice goodies (a link to launch a breakpoint from the error page you get in your browser when an uncaught exception of your application occurs) very soon.
Attachments (3)
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" then
nil
elsif type == "c-return" and extra_data[3] == :set_trace_func then
nil
else
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
# The Breakpoint library provides the convenience of
# being able to inspect and modify state, diagnose
# bugs all via IRB by simply setting breakpoints in
# your applications by the call of a method.
#
# This library was written and is supported by me,
# Florian Gross. I can be reached at flgr@ccan.de
# and enjoy getting feedback about my libraries.
#
# The whole library (including breakpoint_client.rb
# and binding_of_caller.rb) is licensed under the
# same license that Ruby uses. (Which is currently
# either the GNU General Public License or a custom
# one that allows for commercial usage.) If you for
# some good reason need to use this under another
# license please contact me.
require 'irb'
require 'binding_of_caller'
require 'drb'
require 'drb/acl'
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+.
#
# The source code around the location where the breakpoint
# was executed can be examined via +source_lines+. Its
# argument specifies how much lines of context to display.
# The default amount of context is 5 lines. Note that
# the call to +source_lines+ can raise an exception when
# it isn't able to read in the source code.
#
# 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
#
# Breakpoint sessions will automatically have a few
# convenience methods available. See Breakpoint::CommandBundle
# for a list of them.
#
# Breakpoints can also be used remotely over sockets.
# This is implemented by running part of the IRB session
# in the application and part of it in a special client.
# You have to call Breakpoint.activate_drb to enable
# support for remote breakpoints and then run
# breakpoint_client.rb which is distributed with this
# library. See the documentation of Breakpoint.activate_drb
# for details.
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, file, line, &block)
end
Binding.of_caller do |binding_context|
handle_breakpoint(binding_context, message, file, line, &block)
end
end
module CommandBundle
# Proxy to a Breakpoint client. Lets you directly execute code
# in the context of the client.
class Client
def initialize(eval_handler) # :nodoc:
@eval_handler = eval_handler
end
instance_methods.each do |method|
next if method[/^__.+__$/]
undef_method method
end
# Executes the specified code at the client.
def eval(code)
@eval_handler.call(code)
end
# Will execute the specified statement at the client.
def method_missing(method, *args)
if args.empty?
result = eval("#{method}")
else
result = eval("#{method}(*Marshal.load(#{Marshal.dump(args).inspect}))")
end
unless [true, false, nil].include?(result)
result.extend(DRbUndumped) rescue nil
end
return result
end
end
# Returns the source code surrounding the location where the
# breakpoint was issued.
def source_lines(context = 5, return_line_numbers = false)
lines = File.readlines(@__bp_file).map { |line| line.chomp }
break_line = @__bp_line
start_line = [break_line - context, 1].max
end_line = break_line + context
result = lines[(start_line - 1) .. (end_line - 1)]
if return_line_numbers then
return [start_line, break_line, result]
else
return result
end
end
# Lets an object that will forward method calls to the breakpoint
# client. This is useful for outputting longer things at the client
# and so on. You can for example do these things:
#
# client.puts "Hello" # outputs "Hello" at client console
# # outputs "Hello" into the file temp.txt at the client
# client.File.open("temp.txt", "w") { |f| f.puts "Hello" }
def client()
if Breakpoint.use_drb? then
Client.new(Breakpoint.drb_service.eval_handler)
else
Client.new(lambda { |code| eval(code, TOPLEVEL_BINDING) })
end
end
end
def handle_breakpoint(context, message, file = "", line = "", &block) # :nodoc:
catch(:debug_return) do |value|
eval(%{
@__bp_file = #{file.inspect}
@__bp_line = #{line}
extend Breakpoint::CommandBundle
extend DRbUndumped
}, context) rescue nil
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
# These exceptions will be raised on failed asserts
# if Breakpoint.asserts_cause_exceptions is set to
# true.
class FailedAssertError < RuntimeError
end
# 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 in production
# code by setting Breakpoint.optimize_asserts to
# true. (It will still be enabled when Ruby is run
# via the -d argument.)
#
# Example:
# person_name = "Foobar"
# assert { not person_name.nil? }
#
# Note: If you want to use this method from an
# unit test, you will have to call it by its full
# name, Breakpoint.assert.
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}."
if Breakpoint.asserts_cause_exceptions and not $DEBUG then
raise(Breakpoint::FailedAssertError, message)
end
message += " Executing implicit breakpoint."
if context then
return handle_breakpoint(context, message, file, line)
end
Binding.of_caller do |context|
handle_breakpoint(context, message, file, line)
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
# Whether an Exception should be raised on failed asserts
# in non-$DEBUG code or not. By default this is disabled.
attr_accessor :asserts_cause_exceptions
self.asserts_cause_exceptions = false
@use_drb = false
attr_reader :drb_service # :nodoc:
class DRbService # :nodoc:
include DRbUndumped
def initialize
@handler = @eval_handler = @collision_handler = nil
IRB.instance_eval { @CONF[:RC] = true }
IRB.run_config
end
def collision
sleep(0.5) until @collision_handler
@collision_handler.call
end
def ping; end
def add_breakpoint(context, message)
workspace = IRB::WorkSpace.new(context)
workspace.extend(DRbUndumped)
sleep(0.5) until @handler
@handler.call(workspace, message)
end
def register_handler(&block)
@handler = block
end
def unregister_handler
@handler = nil
end
attr_reader :eval_handler
def register_eval_handler(&block)
@eval_handler = block
end
def unregister_eval_handler
@eval_handler = lambda { }
end
def register_collision_handler(&block)
@collision_handler = block
end
def unregister_collision_handler
@collision_handler = lambda { }
end
end
# Will run Breakpoint in DRb mode. This will spawn a server
# that can be attached to via the breakpoint-client 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.)
#
# Also note that by default this is not secure. You can
# however specify a list of allowed hosts. But that will
# still not protect you from somebody reading the data
# as it goes through the net.
#
# A good approach for getting security is setting up an SSH
# tunnel between the DRb service and the client. This is
# usually done like this:
#
# $ ssh -L20000:127.0.0.1:20000 -R10000:127.0.0.1:10000 example.com
# (This will connect port 20000 at the client side to port
# 20000 at the server side, and port 10000 at the server
# side to port 10000 at the client side.)
#
# After that do this on the server side: (the code being debugged)
# Breakpoint.activate_drb("druby://127.0.0.1:20000", "localhost")
#
# And at the client side:
# ruby breakpoint_client.rb -c druby://127.0.0.1:10000 -s druby://127.0.0.1:20000
#
# Running through such a SSH proxy will also let you use
# breakpoint.rb in case you are behind a firewall.
#
# Detailed information about running DRb through firewalls is
# available at http://www.rubygarden.org/ruby?DrbTutorial
def activate_drb(uri = 'druby://localhost:42531',
allowed_hosts = '127.0.0.1')
return false if @use_drb
if allowed_hosts then
acl = ["deny", "all"]
Array(allowed_hosts).each do |host|
acl += ["allow", host]
end
DRb.install_acl(ACL.new(acl))
end
@use_drb = true
@drb_service = DRbService.new
did_collision = false
begin
DRb.start_service(uri, @drb_service)
rescue Errno::EADDRINUSE
# The port is already occupied by another
# Breakpoint service. We will try to tell
# the old service that we want its port.
# It will then forward that request to the
# user and retry.
unless did_collision then
DRbObject.new(nil, uri).collision
did_collision = true
end
sleep(10)
retry
end
return true
end
# Returns true when Breakpoints are used over DRb.
# Breakpoint.activate_drb causes this to be true.
def use_drb?
@use_drb == true
end
end
module IRB # :nodoc:
class << self; remove_method :start; end
def self.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
old_sigint = trap("SIGINT") do
irb.signal_handle
end
catch(:IRB_EXIT) do
irb.eval_input
end
ensure
trap("SIGINT", old_sigint)
end
class << self
alias :old_CurrentContext :CurrentContext
remove_method :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)
if args[0] != :no_proxy and
not [true, false, nil].include?(result)
then
result.extend(DRbUndumped) rescue nil
end
return result
else
old_evaluate(*args)
end
end
end
module InputCompletor
def self.eval(code, context, *more)
# Big hack, this assumes that InputCompletor
# will only call eval() when it wants code
# to be executed in the IRB context.
IRB.conf[:MAIN_CONTEXT].workspace.evaluate(:no_proxy, code, *more)
end
end
end
module DRb # :nodoc:
class DRbObject
undef :inspect
undef :clone
end
end
# See Breakpoint.breakpoint
def breakpoint(id = nil, &block)
Binding.of_caller do |context|
Breakpoint.breakpoint(id, context, &block)
end
end
# See Breakpoint.assert
def assert(&block)
Binding.of_caller do |context|
Breakpoint.assert(context, &block)
end
end
require 'breakpoint'
require 'optparse'
options = {
:ClientURI => nil,
:ServerURI => "druby://localhost:42531",
:RetryDelay => 10
}
ARGV.options do |opts|
script_name = File.basename($0)
opts.banner = [
"Usage: ruby #{script_name} [options] [server uri]",
"",
"This tool lets you connect to a breakpoint service ",
"which was started via Breakpoint.activate_drb.",
"",
"The server uri defaults to druby://localhost:42531"
].join("\n")
opts.separator ""
opts.on("-c", "--client-uri=uri",
"Run the client on the specified uri.",
"This can be used to specify the port",
"that the client uses to allow for back",
"connections from the server.",
"Default: Find a good URI automatically.",
"Example: -c druby://localhost:12345"
) { |options[:ClientURI]| }
opts.on("-s", "--server-uri=uri",
"Connect to the server specified at the",
"specified uri.",
"Default: druby://localhost:42531"
) { |options[:ServerURI]| }
opts.on("-R", "--retry-delay=delay", Integer,
"Automatically try to reconnect to the",
"server after delay seconds when the",
"connection failed or timed out.",
"A value of 0 disables automatical",
"reconnecting completely.",
"Default: 10"
) { |options[:RetryDelay]| }
opts.separator ""
opts.on("-h", "--help",
"Show this help message."
) { puts opts; exit }
opts.parse!
end
options[:ServerURI] = ARGV[0] if ARGV[0]
DRb.start_service(options[:ClientURI])
begin
service = DRbObject.new(nil, options[:ServerURI])
begin
service.register_eval_handler do |code|
result = eval(code, TOPLEVEL_BINDING)
result.extend(DRb::DRbUndumped) rescue nil
result
end
service.register_collision_handler do
msg = [
" *** Breakpoint service collision ***",
" Another Breakpoint service tried to use the",
" port already occupied by this one. It will",
" keep waiting until this Breakpoint service",
" is shut down.",
" ",
" If you are using the Breakpoint library for",
" debugging a Rails or other CGI application",
" this likely means that this Breakpoint",
" session belongs to an earlier, outdated",
" request and should be shut down via 'exit'."
].join("\n")
if RUBY_PLATFORM["win"] then
# This sucks. Sorry, I'm not doing this because
# I like funky message boxes -- I need to do this
# because on Windows I have no way of displaying
# my notification via puts() when gets() is still
# being performed on STDIN. I have not found a
# better solution.
begin
require 'tk'
root = TkRoot.new { withdraw }
Tk.messageBox('message' => msg, 'type' => 'ok')
root.destroy
rescue Exception
puts "", msg, ""
end
else
puts "", msg, ""
end
end
service.register_handler do |workspace, message|
puts message
IRB.start(nil, nil, workspace)
end
loop do
begin
service.ping
rescue DRb::DRbConnError => error
puts "Server exited. Exiting..."
exit!
end
sleep(0.5)
end
ensure
service.unregister_handler
end
rescue Exception => error
if options[:RetryDelay] > 0 then
puts "No connection to breakpoint service at #{options[:ServerURI]}:",
" (#{error})",
" Reconnecting in #{options[:RetryDelay]} seconds..."
sleep options[:RetryDelay]
retry
else
raise
end
end