# Ruby

**URL:** https://www.ruby-forum.com/c/ruby/7.md?page=1667

[Latest](https://www.ruby-forum.com/latest.md) · [Categories](https://www.ruby-forum.com/categories.md) · [Tags](https://www.ruby-forum.com/tags.md)

**Page:** 1668

---

## [CanvasPlot, createPlotAxis and createLinePlot](https://www.ruby-forum.com/t/canvasplot-createplotaxis-and-createlineplot/70283)

<div class="topic-metadata">

**Author:** [@lynchnco](https://www.ruby-forum.com/u/lynchnco)\
**Replies:** 10\
**Last updated:** [September 28, 2006, 9:05pm UTC](https://www.ruby-forum.com/t/canvasplot-createplotaxis-and-createlineplot/70283 "2006-09-28T21:05:24Z")

</div>

Good afternoon, I’m trying to get a line plot (x-y coordinates with a line) up and running on a Windows XP/Pro box. I’m using references: The “Pick Axe” book “Mastering Perl/Tk” The three classes or methods that wi…

---

## [Multi-Module Alternative to the Factory Pattern?](https://www.ruby-forum.com/t/multi-module-alternative-to-the-factory-pattern/70310)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 5\
**Last updated:** [September 28, 2006, 8:17pm UTC](https://www.ruby-forum.com/t/multi-module-alternative-to-the-factory-pattern/70310 "2006-09-28T20:17:13Z")

</div>

I’ve been using a factory pattern for a set of packaging classes –classes that generate different package formats (eg. Debian, RPM, etc.), but it’s not quite the right fit b/c it leads to repetition of the staging ste…

---

## [Alias for a class?](https://www.ruby-forum.com/t/alias-for-a-class/70312)

<div class="topic-metadata">

**Author:** [@hopscotch](https://www.ruby-forum.com/u/hopscotch)\
**Replies:** 7\
**Last updated:** [September 28, 2006, 6:42pm UTC](https://www.ruby-forum.com/t/alias-for-a-class/70312 "2006-09-28T18:42:55Z")

</div>

Hi all, Last night I was playing with some third-party lib and found myself having to type StupidlyLongLibName::LongModuleName::LongClassName repeatedly and I wanted a mechanism where I could rename these classes for…

---

## [Code to S-Exp (#95)](https://www.ruby-forum.com/t/code-to-s-exp-95/70356)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [September 28, 2006, 5:52pm UTC](https://www.ruby-forum.com/t/code-to-s-exp-95/70356 "2006-09-28T17:52:33Z")

</div>

This quiz is a little more challenging than it looks. The real trick is to satisfy the quiz conditions without breaking the Ruby interpreter in the process. Let me show you what I mean. It’s easy enough to get the …

---

## [Can't get the @ on fxri](https://www.ruby-forum.com/t/cant-get-the-on-fxri/70277)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 10\
**Last updated:** [September 28, 2006, 5:32pm UTC](https://www.ruby-forum.com/t/cant-get-the-on-fxri/70277 "2006-09-28T17:32:27Z")

</div>

I’m trying several ways to write the @ at, but just can’t; tryed alt + 64, ctrl+alt+q, and nothing, I give up can sombody help me ?

---

## [Re: Feedback messages to user using Tk](https://www.ruby-forum.com/t/re-feedback-messages-to-user-using-tk/70336)

<div class="topic-metadata">

**Author:** [@CameronS\_Gemma\_SUK](https://www.ruby-forum.com/u/CameronS_Gemma_SUK)\
**Replies:** 1\
**Last updated:** [September 28, 2006, 5:06pm UTC](https://www.ruby-forum.com/t/re-feedback-messages-to-user-using-tk/70336 "2006-09-28T17:06:21Z")

</div>

Thanks again Morton! The code was written off the top of my head into the email (which would explain the syntax errors, honest!) but the conceptual error is probably where I was having the problem. I’m still a ruby nu…

---

## [Ruby-doc.org](https://www.ruby-forum.com/t/ruby-doc-org/70188)

<div class="topic-metadata">

**Author:** [@newbie](https://www.ruby-forum.com/u/newbie)\
**Replies:** 6\
**Last updated:** [September 28, 2006, 5:04pm UTC](https://www.ruby-forum.com/t/ruby-doc-org/70188 "2006-09-28T17:04:20Z")

</div>

Is anyone else having a problem with ruby-doc.org ? I haven’t been able to connect to it for two days.

---

## [GUI programming for WinXP/Linux/OSX?](https://www.ruby-forum.com/t/gui-programming-for-winxp-linux-osx/69999)

<div class="topic-metadata">

**Author:** [@rhaus](https://www.ruby-forum.com/u/rhaus)\
**Replies:** 41\
**Last updated:** [September 28, 2006, 4:15pm UTC](https://www.ruby-forum.com/t/gui-programming-for-winxp-linux-osx/69999 "2006-09-28T16:15:38Z")

</div>

I am planning a project that has the following main requirements: it must run on WinXP and Linux, idally also on OSX it must have a GUI preferably with the GUI’s native widget set it must allow scripting access to syst…

---

## [Injecting truth](https://www.ruby-forum.com/t/injecting-truth/70295)

<div class="topic-metadata">

**Author:** [@Ken\_Kunz](https://www.ruby-forum.com/u/Ken_Kunz)\
**Replies:** 9\
**Last updated:** [September 28, 2006, 4:05pm UTC](https://www.ruby-forum.com/t/injecting-truth/70295 "2006-09-28T16:05:57Z")

</div>

I had a scenario arise today where I needed an iterator with similar semantics as Enumerable#all?, but non-short-circuiting. We came up with a fairly elegant solution (imho), so I thought I’d be a good rubyzen and sha…

---

## [Interesting snippets on dynamic method definitions in Ruby](https://www.ruby-forum.com/t/interesting-snippets-on-dynamic-method-definitions-in-ruby/70348)

<div class="topic-metadata">

**Author:** [@sjmadsen](https://www.ruby-forum.com/u/sjmadsen)\
**Replies:** 0\
**Last updated:** [September 28, 2006, 3:17pm UTC](https://www.ruby-forum.com/t/interesting-snippets-on-dynamic-method-definitions-in-ruby/70348 "2006-09-28T15:17:36Z")

</div>

Hi, I’m new to the list - I hope this posting is welcome. I’ve been (like everyone?) learning and enjoying Ruby’s intricacies. One of those intricacies is explained briefly in the Dave T.’ Pickaxe book: dynamic metho…

---

## [Hash to String?](https://www.ruby-forum.com/t/hash-to-string/70191)

<div class="topic-metadata">

**Author:** [@Josselin](https://www.ruby-forum.com/u/Josselin)\
**Replies:** 5\
**Last updated:** [September 28, 2006, 1:41pm UTC](https://www.ruby-forum.com/t/hash-to-string/70191 "2006-09-28T13:41:42Z")

</div>

I need to produce this kind of result l = { “January” =\> “1”}, {"February =\> “2”}, { “March” =\> “3”}, … } so I wrote h = (Array.new(13) {|i| Hash\[Date::MONTHNAMES\[i\], i.to\_s\]}).slice(1,12) which results in : \[{“Jan…

---

## [Beta (trial) version of Ruby/TkORCA](https://www.ruby-forum.com/t/beta-trial-version-of-ruby-tkorca/70338)

<div class="topic-metadata">

**Author:** [@Hidetoshi\_NAGAI](https://www.ruby-forum.com/u/Hidetoshi_NAGAI)\
**Replies:** 0\
**Last updated:** [September 28, 2006, 12:25pm UTC](https://www.ruby-forum.com/t/beta-trial-version-of-ruby-tkorca/70338 "2006-09-28T12:25:36Z")

</div>

Hi all, Beta (trial) version of Ruby/TkORCA is available. \*\*\* What’s that? \*\*\*\* Its concept is “GUI, Anywhere!”. Ruby/TkORCA (Ruby/Tk On RFB Canvas) is a framework which makes Ruby/Tk-based multiwindow GUI applicati…

---

## [Module and Test::Unit](https://www.ruby-forum.com/t/module-and-test-unit/70190)

<div class="topic-metadata">

**Author:** [@aidy](https://www.ruby-forum.com/u/aidy)\
**Replies:** 3\
**Last updated:** [September 28, 2006, 11:45am UTC](https://www.ruby-forum.com/t/module-and-test-unit/70190 "2006-09-28T11:45:31Z")

</div>

Hi, Is there any way we can use test assertations in a module, or do we always need to create a test class and inherit test unit? I am using assertations for GUI tests and have modules with re-usable methods. thank …

---

## [Timeout and Exponetial Regexes](https://www.ruby-forum.com/t/timeout-and-exponetial-regexes/70333)

<div class="topic-metadata">

**Author:** [@eden\_li](https://www.ruby-forum.com/u/eden_li)\
**Replies:** 0\
**Last updated:** [September 28, 2006, 10:17am UTC](https://www.ruby-forum.com/t/timeout-and-exponetial-regexes/70333 "2006-09-28T10:17:19Z")

</div>

Side-stepping the debate about running exponential regular expressions first place, I’d like to catch a long running regex using Timeout.timeout(): $ ruby -v && irb -r timeout ruby 1.8.4 (2005-12-24) \[i486-linux\] ir…

---

## [Ruby on Rails Relationships](https://www.ruby-forum.com/t/ruby-on-rails-relationships/69840)

<div class="topic-metadata">

**Author:** [@Murdoc](https://www.ruby-forum.com/u/Murdoc)\
**Replies:** 4\
**Last updated:** [September 28, 2006, 9:43am UTC](https://www.ruby-forum.com/t/ruby-on-rails-relationships/69840 "2006-09-28T09:43:18Z")

</div>

Hi all, I’m not sure if this is an appropriate group to ask for assitance with Ruby on Rails, so let me know if it isn’t. Anyways, I am having trouble figuring out how to setup what would appear to be a simple has\_on…

---

## [Array shift bug](https://www.ruby-forum.com/t/array-shift-bug/69782)

<div class="topic-metadata">

**Author:** [@bobh](https://www.ruby-forum.com/u/bobh)\
**Replies:** 21\
**Last updated:** [September 28, 2006, 8:57am UTC](https://www.ruby-forum.com/t/array-shift-bug/69782 "2006-09-28T08:57:15Z")

</div>

A short article describing a problem in the implementation of array shift in Ruby 1.8.4 with a simple one-line fix in the C code is here: http://recursive.ca/hutch/index.php?p=361 This is the source of the problem Mon…

---

## [Ahh, the hazards of an interpretive language](https://www.ruby-forum.com/t/ahh-the-hazards-of-an-interpretive-language/70163)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 6\
**Last updated:** [September 28, 2006, 8:47am UTC](https://www.ruby-forum.com/t/ahh-the-hazards-of-an-interpretive-language/70163 "2006-09-28T08:47:13Z")

</div>

This sort of thing has most probably been noted and reported by other people before, but as a relative newcomer to ruby I found it amusing… At a point in the code I was writing I found I wanted an ‘alternative if’, s…

---

## [Hoe 1.0.4 released](https://www.ruby-forum.com/t/hoe-1-0-4-released/69786)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 11\
**Last updated:** [September 28, 2006, 7:25am UTC](https://www.ruby-forum.com/t/hoe-1-0-4-released/69786 "2006-09-28T07:25:05Z")

</div>

Hoe http://rubyforge.org/projects/seattlerb/ http://seattlerb.rubyforge.org/hoe/ removed\_email\_address@domain.invalid == DESCRIPTION: Hoe is a simple rake/rubygems helper for project Rakefiles. It generates all the…

---

## [Cry for help - make this faster](https://www.ruby-forum.com/t/cry-for-help-make-this-faster/70156)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 7\
**Last updated:** [September 28, 2006, 6:41am UTC](https://www.ruby-forum.com/t/cry-for-help-make-this-faster/70156 "2006-09-28T06:41:00Z")

</div>

yes, it will require deep ruby and ‘c’ knowledge http://codeforpeople.com/lib/ruby/acgi/acgi-0.1.0/README and, obviously http://codeforpeople.com/lib/ruby/acgi/ i think it’s a potentially powerful idea. if you know …

---

## [Prime sieve optimization](https://www.ruby-forum.com/t/prime-sieve-optimization/70315)

<div class="topic-metadata">

**Author:** [@C\_Erler](https://www.ruby-forum.com/u/C_Erler)\
**Replies:** 1\
**Last updated:** [September 28, 2006, 5:46am UTC](https://www.ruby-forum.com/t/prime-sieve-optimization/70315 "2006-09-28T05:46:54Z")

</div>

The prime sieve of Atkin (Sieve of Atkin - Wikipedia) is, if done right, faster than the sieve of Eratosthenes. I’ve included a reimplementation of the mathn Prime class using this sieve, but it’s slower than the one…

---

## [Idiomatic file snarf](https://www.ruby-forum.com/t/idiomatic-file-snarf/70294)

<div class="topic-metadata">

**Author:** [@tbobker](https://www.ruby-forum.com/u/tbobker)\
**Replies:** 6\
**Last updated:** [September 28, 2006, 5:32am UTC](https://www.ruby-forum.com/t/idiomatic-file-snarf/70294 "2006-09-28T05:32:52Z")

</div>

I want to open a file, suck the contexts into a variable and close it again. I suppose I could IO#each and glue the lines together. Currently I have f = File.new(fname) text = f.read f.close Surely there’s …

---

## [Testunit message override?](https://www.ruby-forum.com/t/testunit-message-override/69446)

<div class="topic-metadata">

**Author:** [@rjeffries](https://www.ruby-forum.com/u/rjeffries)\
**Replies:** 9\
**Last updated:** [September 28, 2006, 4:26am UTC](https://www.ruby-forum.com/t/testunit-message-override/69446 "2006-09-28T04:26:39Z")

</div>

If this assert fails: assert\_equal(Date.new(2006,4,15), calc.disbursal\_date) it prints something like: test\_PayFifteenthAfterQuarter(ProjectTest) \[./projecttest.rb:13\]: \<#\<Date: 4907679/2,0,2299161\>\> expected but…

---

## [Re: How to copy a method from one class to another](https://www.ruby-forum.com/t/re-how-to-copy-a-method-from-one-class-to-another/69932)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 11\
**Last updated:** [September 28, 2006, 4:16am UTC](https://www.ruby-forum.com/t/re-how-to-copy-a-method-from-one-class-to-another/69932 "2006-09-28T04:16:36Z")

</div>

From: Sam K. \[mailto:removed\_email\_address@domain.invalid\] Now I want C2 to have f method so that I can call C2.new.f. Select lines 2-4. Copy. Move caret inside C2. Paste. :slight\_smile: Ruby’s methods are not f…

---

## [Embedding the Ruby interpreter in C# app](https://www.ruby-forum.com/t/embedding-the-ruby-interpreter-in-c-app/70308)

<div class="topic-metadata">

**Author:** [@Nick\_Partridge](https://www.ruby-forum.com/u/Nick_Partridge)\
**Replies:** 0\
**Last updated:** [September 28, 2006, 3:16am UTC](https://www.ruby-forum.com/t/embedding-the-ruby-interpreter-in-c-app/70308 "2006-09-28T03:16:32Z")

</div>

Hi, I’m looking for some assistance in embedding the ruby interpreter in C#. I’ve got well through the basics of using p/invoke to load the C api methods, and I’m having some brain-destroying problems with getting a r…

---

## [Curses](https://www.ruby-forum.com/t/curses/70149)

<div class="topic-metadata">

**Author:** [@OverdorfS\_Sam](https://www.ruby-forum.com/u/OverdorfS_Sam)\
**Replies:** 11\
**Last updated:** [September 28, 2006, 2:16am UTC](https://www.ruby-forum.com/t/curses/70149 "2006-09-28T02:16:29Z")

</div>

Is anyone using the Curses class? Is anyone maintaining the Curses class? It looks like the Curses function move(y,x) is calling the wrong library routine. It is calling the window move function and not the cursor po…

---

## [Bonjour and Socket::getaddrinfo](https://www.ruby-forum.com/t/bonjour-and-socket-getaddrinfo/70268)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 13\
**Last updated:** [September 27, 2006, 11:04pm UTC](https://www.ruby-forum.com/t/bonjour-and-socket-getaddrinfo/70268 "2006-09-27T23:04:12Z")

</div>

I was having a problem with DRb coming from Socket::getaddrinfo not finding an address for the name returned by Socket::gethostname. I’m running Mac OS 10.4 and Ruby 1.8. Replicating line 837 in drb.rb in irb gave m…

---

## [Problem returning a boolean to a dll](https://www.ruby-forum.com/t/problem-returning-a-boolean-to-a-dll/70280)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [September 27, 2006, 10:56pm UTC](https://www.ruby-forum.com/t/problem-returning-a-boolean-to-a-dll/70280 "2006-09-27T22:56:11Z")

</div>

Here is part of the code, manipulating an application (LaserFiche) API through OLE/COM: lf\_app = WIN32OLE.new(‘LFDLL.Application’) lf\_server = lf\_app.GetServerByName(‘xxxxx’) lf\_db = lf\_server.GetDatabaseByName(‘xxxx…

---

## [Ruby/Git?](https://www.ruby-forum.com/t/ruby-git/70262)

<div class="topic-metadata">

**Author:** [@reflex](https://www.ruby-forum.com/u/reflex)\
**Replies:** 4\
**Last updated:** [September 27, 2006, 10:32pm UTC](https://www.ruby-forum.com/t/ruby-git/70262 "2006-09-27T22:32:06Z")

</div>

Hi I’ve been working with subversion for some time now and thought I’d have a look at trying one of the distributed SCMs. I read about many of them, and ended up with a choice between mercurial and git. Since both se…

---

## [Threading and Deadlock](https://www.ruby-forum.com/t/threading-and-deadlock/70244)

<div class="topic-metadata">

**Author:** [@jmckible](https://www.ruby-forum.com/u/jmckible)\
**Replies:** 10\
**Last updated:** [September 27, 2006, 10:22pm UTC](https://www.ruby-forum.com/t/threading-and-deadlock/70244 "2006-09-27T22:22:05Z")

</div>

I’m making the back end for a feed reader. I plan to have a daemon which periodically checks feeds for updates. The daemon will have one refill thread responsible for maintaining a list of feeds to be updated. It wi…

---

## [StdLib Documentation Download](https://www.ruby-forum.com/t/stdlib-documentation-download/70276)

<div class="topic-metadata">

**Author:** [@plambert](https://www.ruby-forum.com/u/plambert)\
**Replies:** 0\
**Last updated:** [September 27, 2006, 9:56pm UTC](https://www.ruby-forum.com/t/stdlib-documentation-download/70276 "2006-09-27T21:56:00Z")

</div>

Dear group: I have a very slow connection, and I like to download documentation whenever possible. The documentation online at RDoc Documentation is described as “v0.10.1, 2006-09-27”. The online documentation has …

[Previous page](https://www.ruby-forum.com/c/ruby/7.md?page=1666)

[Next page](https://www.ruby-forum.com/c/ruby/7.md?page=1668)
