# Ruby

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

[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:** 1842

---

## [Input without blocking](https://www.ruby-forum.com/t/input-without-blocking/87450)

<div class="topic-metadata">

**Author:** [@yahn](https://www.ruby-forum.com/u/yahn)\
**Replies:** 25\
**Last updated:** [March 29, 2006, 6:47am UTC](https://www.ruby-forum.com/t/input-without-blocking/87450 "2006-03-29T06:47:59Z")

</div>

How do you do something like gets but without blocking? All I want to do is try to see if anything was input and if it wasn’t then just go on running the rest of my code.

---

## [Noob: The ruby way to multiple Array by multiple?](https://www.ruby-forum.com/t/noob-the-ruby-way-to-multiple-array-by-multiple/56116)

<div class="topic-metadata">

**Author:** [@eric99](https://www.ruby-forum.com/u/eric99)\
**Replies:** 4\
**Last updated:** [March 29, 2006, 6:09am UTC](https://www.ruby-forum.com/t/noob-the-ruby-way-to-multiple-array-by-multiple/56116 "2006-03-29T06:09:17Z")

</div>

I want to make a Array multipled by another Array, and the following semantic. For example: \[1, 2, 3\] \* \[4, 5\] then I will want \[\[1, 4\], \[1, 5\], \[2, 4\], \[2, 5\], \[3, 4\], \[3, 5\]\] returned. I have the following code s…

---

## [Funky alias problem](https://www.ruby-forum.com/t/funky-alias-problem/89680)

<div class="topic-metadata">

**Author:** [@polypus](https://www.ruby-forum.com/u/polypus)\
**Replies:** 3\
**Last updated:** [March 29, 2006, 6:08am UTC](https://www.ruby-forum.com/t/funky-alias-problem/89680 "2006-03-29T06:08:22Z")

</div>

hi, if i write module M def foo old\_foo end end class X def foo puts X end def extend\_yourself alias old\_foo foo extend M end end class Y \< X def foo puts Y end end x = X.new y = Y.new x.foo -\> …

---

## [Opposite of ||= pattern?](https://www.ruby-forum.com/t/opposite-of-pattern/56205)

<div class="topic-metadata">

**Author:** [@vtphysguy](https://www.ruby-forum.com/u/vtphysguy)\
**Replies:** 7\
**Last updated:** [March 29, 2006, 5:43am UTC](https://www.ruby-forum.com/t/opposite-of-pattern/56205 "2006-03-29T05:43:56Z")

</div>

A cheap just-in-time initialization trick is the “||=” trick: def add\_name(n) @name ||= Array.new @name \<\< n end Now, how would you do the opposite of this pattern? More specifically, what kind of construct would …

---

## [In Ruby, is a set just a hash without values?](https://www.ruby-forum.com/t/in-ruby-is-a-set-just-a-hash-without-values/89704)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 2\
**Last updated:** [March 29, 2006, 2:34am UTC](https://www.ruby-forum.com/t/in-ruby-is-a-set-just-a-hash-without-values/89704 "2006-03-29T02:34:31Z")

</div>

A question - is there an object in Ruby analogous to a Java set, which has hash-like functionality but no values? Or should I just use a hash with no values? Actually, what I’m really trying to do is “unique-ize” an a…

---

## [Article: An Exercise in Metaprogramming with Ruby](https://www.ruby-forum.com/t/article-an-exercise-in-metaprogramming-with-ruby/55895)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 16\
**Last updated:** [March 29, 2006, 2:05am UTC](https://www.ruby-forum.com/t/article-an-exercise-in-metaprogramming-with-ruby/55895 "2006-03-29T02:05:43Z")

</div>

I failed to post this link before, so here it is now: http://www.devsource.com/article2/0,1895,1928561,00.asp My editor said it “didn’t do that well” in terms of page views. And I said, well, I should have posted it …

---

## [Lazyscript 0.1.0](https://www.ruby-forum.com/t/lazyscript-0-1-0/89674)

<div class="topic-metadata">

**Author:** [@benny](https://www.ruby-forum.com/u/benny)\
**Replies:** 1\
**Last updated:** [March 29, 2006, 2:04am UTC](https://www.ruby-forum.com/t/lazyscript-0-1-0/89674 "2006-03-29T02:04:02Z")

</div>

Benny is happy to announce his next gem: “lazyscript” Dear list, I hope this is useful for someone and I am curious what you think about it. == Overview LazyScript offers an easy way to create text based applicatio…

---

## [Using unit test](https://www.ruby-forum.com/t/using-unit-test/86487)

<div class="topic-metadata">

**Author:** [@rtilley](https://www.ruby-forum.com/u/rtilley)\
**Replies:** 4\
**Last updated:** [March 29, 2006, 1:29am UTC](https://www.ruby-forum.com/t/using-unit-test/86487 "2006-03-29T01:29:02Z")

</div>

What is the most prevalent way of using unit testing in Ruby? Do I require ‘test/unit’ and add test methods to production scripts and then comment the testing portions out when not testing? Or, should I develop a ‘tes…

---

## [Is -w really useful?](https://www.ruby-forum.com/t/is-w-really-useful/56028)

<div class="topic-metadata">

**Author:** [@wybodekker](https://www.ruby-forum.com/u/wybodekker)\
**Replies:** 6\
**Last updated:** [March 29, 2006, 12:44am UTC](https://www.ruby-forum.com/t/is-w-really-useful/56028 "2006-03-29T00:44:11Z")

</div>

I would like to use the -w commandline option always, but any useful output is always obscured by message from the standard libraries: For example: /usr/local/lib/ruby/gems/1.8/gems/rio-0.3.7/lib/rio/if/grande.rb:404: …

---

## [Regexp to match strings that \_don't\_ being with a string](https://www.ruby-forum.com/t/regexp-to-match-strings-that-dont-being-with-a-string/89295)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 13\
**Last updated:** [March 28, 2006, 10:59pm UTC](https://www.ruby-forum.com/t/regexp-to-match-strings-that-dont-being-with-a-string/89295 "2006-03-28T22:59:07Z")

</div>

I would like to write a regexp that will match a string that does NOT start with a specified set of characters. For example, Given: xyz123 asldfhsl xyk2345 and assume that I want to see only strings that don’t sta…

---

## [Resolv.rb - documentation and its name](https://www.ruby-forum.com/t/resolv-rb-documentation-and-its-name/89334)

<div class="topic-metadata">

**Author:** [@pool007](https://www.ruby-forum.com/u/pool007)\
**Replies:** 5\
**Last updated:** [March 28, 2006, 10:08pm UTC](https://www.ruby-forum.com/t/resolv-rb-documentation-and-its-name/89334 "2006-03-28T22:08:42Z")

</div>

Hi group. I’d like to test resolve.rb, but I have troubles. First of all, where can I get some documents on resolv.rb? I use RDoc Documentation, but there’s none. Second of all, why is it named resolve instead of Net…

---

## [JRuby 0.8.3 released](https://www.ruby-forum.com/t/jruby-0-8-3-released/89196)

<div class="topic-metadata">

**Author:** [@Thomas\_E\_Enebo](https://www.ruby-forum.com/u/Thomas_E_Enebo)\
**Replies:** 1\
**Last updated:** [March 28, 2006, 9:54pm UTC](https://www.ruby-forum.com/t/jruby-0-8-3-released/89196 "2006-03-28T21:54:02Z")

</div>

JRuby is a project to provide a Java implementation of the Ruby language and interpreter. JRuby 0.8.3 has been released. This version fixes a huge number of problems and boasts the following notables: irb (jirb) …

---

## [Downcase/uppercase for non-English characters](https://www.ruby-forum.com/t/downcase-uppercase-for-non-english-characters/83721)

<div class="topic-metadata">

**Author:** [@victor123789](https://www.ruby-forum.com/u/victor123789)\
**Replies:** 3\
**Last updated:** [March 28, 2006, 9:47pm UTC](https://www.ruby-forum.com/t/downcase-uppercase-for-non-english-characters/83721 "2006-03-28T21:47:46Z")

</div>

Hello. Can subj be done for 1-byte (non-Unicode) encodings, particularly windows-1251 (Russian). Are there some interpretor options or third-party libraries for locale-specific operations? Thanks. Victor.

---

## [Tracking DRbObject References?](https://www.ruby-forum.com/t/tracking-drbobject-references/56089)

<div class="topic-metadata">

**Author:** [@dnorton](https://www.ruby-forum.com/u/dnorton)\
**Replies:** 1\
**Last updated:** [March 28, 2006, 9:12pm UTC](https://www.ruby-forum.com/t/tracking-drbobject-references/56089 "2006-03-28T21:12:51Z")

</div>

Hi, Does anyone know of any work done on keeping track of the number of the existing DRbObject references to a local object? It seems that if I can keep track of the propogation of DRbObjects (adding calls to a servi…

---

## [Verifying SSL with http-access2 on Windows](https://www.ruby-forum.com/t/verifying-ssl-with-http-access2-on-windows/87796)

<div class="topic-metadata">

**Author:** [@lstrecv](https://www.ruby-forum.com/u/lstrecv)\
**Replies:** 4\
**Last updated:** [March 28, 2006, 8:41pm UTC](https://www.ruby-forum.com/t/verifying-ssl-with-http-access2-on-windows/87796 "2006-03-28T20:41:55Z")

</div>

Anyone know how to get http-access2 to verify the SSL Certificate on Windows? I can get it to not verify, but I can’t seem to get it to use local certs to verify… I guess I need to install them somewhere and set some…

---

## [Callback For A Timer Event To Display Widget in Ruby/Tk](https://www.ruby-forum.com/t/callback-for-a-timer-event-to-display-widget-in-ruby-tk/87746)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 6\
**Last updated:** [March 28, 2006, 8:36pm UTC](https://www.ruby-forum.com/t/callback-for-a-timer-event-to-display-widget-in-ruby-tk/87746 "2006-03-28T20:36:52Z")

</div>

Kind All, Um, I need to code an elapsed time display in Ruby/Tk. It was straightforward to use the Time class and the Time#srtftime method to get the time in just the form I wanted: t = Time.new; puts “Time is #{t.st…

---

## [Metaprogramming conventions](https://www.ruby-forum.com/t/metaprogramming-conventions/55904)

<div class="topic-metadata">

**Author:** [@avdi](https://www.ruby-forum.com/u/avdi)\
**Replies:** 1\
**Last updated:** [March 28, 2006, 7:03pm UTC](https://www.ruby-forum.com/t/metaprogramming-conventions/55904 "2006-03-28T19:03:41Z")

</div>

\[Note: in the following I use the term “extension” to refer to any library which extends Ruby’s built-in classes, particularly the Module/Class classes.\] In Ruby we do a lot of cool metaprogramming tricks. In particu…

---

## [Seeking win32ole CDO/Mapi help](https://www.ruby-forum.com/t/seeking-win32ole-cdo-mapi-help/89241)

<div class="topic-metadata">

**Author:** [@ksader](https://www.ruby-forum.com/u/ksader)\
**Replies:** 4\
**Last updated:** [March 28, 2006, 6:53pm UTC](https://www.ruby-forum.com/t/seeking-win32ole-cdo-mapi-help/89241 "2006-03-28T18:53:52Z")

</div>

I’m trying to read a remote mail store using the CDO OLE interface using the ProfileInfo interface as described here: http://www.vbip.com/books/1861002068/chapter\_2068\_04.asp, but I’ve run into the wall of my own igno…

---

## [Changing the quote-character in csv parsing](https://www.ruby-forum.com/t/changing-the-quote-character-in-csv-parsing/56181)

<div class="topic-metadata">

**Author:** [@snej](https://www.ruby-forum.com/u/snej)\
**Replies:** 3\
**Last updated:** [March 28, 2006, 6:19pm UTC](https://www.ruby-forum.com/t/changing-the-quote-character-in-csv-parsing/56181 "2006-03-28T18:19:01Z")

</div>

Hi, I have a bunch of files containing lines as comma-seperated values. Unfortunately, the character used for quoting is a single quote (’) and not the double quote ("). How can I tell the csv library (or fastercsv o…

---

## [Chaning the quote-character in csv parsing](https://www.ruby-forum.com/t/chaning-the-quote-character-in-csv-parsing/89069)

<div class="topic-metadata">

**Author:** [@snej](https://www.ruby-forum.com/u/snej)\
**Replies:** 1\
**Last updated:** [March 28, 2006, 6:04pm UTC](https://www.ruby-forum.com/t/chaning-the-quote-character-in-csv-parsing/89069 "2006-03-28T18:04:18Z")

</div>

Hi, I have a bunch of files containing lines as comma-seperated values. Unfortunately, the character used for quoting is a single quote (’) and not the double quote ("). How can I tell the csv library (or fastercsv o…

---

## [Re: Oracle Stored Procedures - Out Vars](https://www.ruby-forum.com/t/re-oracle-stored-procedures-out-vars/56182)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [March 28, 2006, 5:47pm UTC](https://www.ruby-forum.com/t/re-oracle-stored-procedures-out-vars/56182 "2006-03-28T17:47:36Z")

</div>

ruby-dbi doesn’t support out parameters. Use a driver specific function: sth.func(:bind\_value, 0) Looks like we need to add StatementHandle#bind\_param\_inout. I’ll put in a feature request. Regards, Dan

---

## [Re: Array resizing](https://www.ruby-forum.com/t/re-array-resizing/89070)

<div class="topic-metadata">

**Author:** [@KroegerS\_Simon\_Sext](https://www.ruby-forum.com/u/KroegerS_Simon_Sext)\
**Replies:** 1\
**Last updated:** [March 28, 2006, 5:34pm UTC](https://www.ruby-forum.com/t/re-array-resizing/89070 "2006-03-28T17:34:34Z")

</div>

\] a = \[\[1,2,3\], \[1\], \[1,2,3,4\]\] p SyncEnumerator.new(\*a).map{|s| s} #=\> \[\[1, 1, 1\], \[2, nil, 2\], \[3, nil, 3\], \[nil, nil, 4\]\] I think, it isn’t sole case, when we can want having array of arbitrary size. At lea…

---

## [Gets and chomp method question](https://www.ruby-forum.com/t/gets-and-chomp-method-question/88031)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 6\
**Last updated:** [March 28, 2006, 5:34pm UTC](https://www.ruby-forum.com/t/gets-and-chomp-method-question/88031 "2006-03-28T17:34:04Z")

</div>

I’m working through the “Gets and chomp method” section of Learn to Program on Mixing It Up - Learn to Program I have a problem. I have entered the strings: puts ‘Hello there, and what's your name?’ name = gets puts…

---

## [Array resizing](https://www.ruby-forum.com/t/array-resizing/88421)

<div class="topic-metadata">

**Author:** [@victor123789](https://www.ruby-forum.com/u/victor123789)\
**Replies:** 6\
**Last updated:** [March 28, 2006, 3:23pm UTC](https://www.ruby-forum.com/t/array-resizing/88421 "2006-03-28T15:23:17Z")

</div>

Maybe dumb question, but… I have not found anything like Array.resize, i.e. a = \[1,2\] a.resize(5) #=\> \[1,2,nil,nil,nil\] a.resize(5, 3) #=\> \[1,2,3,3,3\] I can use Array.fill, but a.fill(3, a.size, a.size+2) loo…

---

## [Scraping websites](https://www.ruby-forum.com/t/scraping-websites/55854)

<div class="topic-metadata">

**Author:** [@Kev\_J](https://www.ruby-forum.com/u/Kev_J)\
**Replies:** 11\
**Last updated:** [March 28, 2006, 2:28pm UTC](https://www.ruby-forum.com/t/scraping-websites/55854 "2006-03-28T14:28:59Z")

</div>

Hi I’m considering a side-project where I’d have to scrape a couple of websites and aggregate the results. So far I’ve done a couple of experiments with html-parser, but I’m not really happy with it. I’d hate to ju…

---

## [A new group of people to help each other with ruby and rails](https://www.ruby-forum.com/t/a-new-group-of-people-to-help-each-other-with-ruby-and-rails/88389)

<div class="topic-metadata">

**Author:** [@julian](https://www.ruby-forum.com/u/julian)\
**Replies:** 0\
**Last updated:** [March 28, 2006, 2:04pm UTC](https://www.ruby-forum.com/t/a-new-group-of-people-to-help-each-other-with-ruby-and-rails/88389 "2006-03-28T14:04:44Z")

</div>

I propose to set up a group of people “in the real world”, that meet up from time to time near to Reading Berkshire that help each other with ruby rails and mysql in particular and of course building web applications …

---

## [LEGAL$B%U%!%$%k$K$D$$$F(B](https://www.ruby-forum.com/t/legal-b-u-k-k-d-f-b/88388)

<div class="topic-metadata">

**Author:** [@madoka\_yamamoto](https://www.ruby-forum.com/u/madoka_yamamoto)\
**Replies:** 1\
**Last updated:** [March 28, 2006, 1:42pm UTC](https://www.ruby-forum.com/t/legal-b-u-k-k-d-f-b/88388 "2006-03-28T13:42:02Z")

</div>

e$B$3$s$K$A$O;3K\\e(B e$B1\_$H?=$7$^$9!#e(B \[ruby-list:41877\]e$B$r$$Fe(B rubye$B$N%=!\<%9$re(Bgrep -ri licensee$B$7$F$6!\<$C$H8+$F$$F$$$?$N$G$9$,e(B ext/bigdecimal/bigdecimal.c ext/bigdecimal/bigdecimal.h e$B\>e5-Fs$D$O…

---

## [How to create a Windows Service using Ruby?](https://www.ruby-forum.com/t/how-to-create-a-windows-service-using-ruby/88259)

<div class="topic-metadata">

**Author:** [@zubairyounas](https://www.ruby-forum.com/u/zubairyounas)\
**Replies:** 1\
**Last updated:** [March 28, 2006, 1:37pm UTC](https://www.ruby-forum.com/t/how-to-create-a-windows-service-using-ruby/88259 "2006-03-28T13:37:33Z")

</div>

Dear all, I am a novice to Ruby. My first challenge is to develop a Windows Service in Ruby. I am unable to find a way to do so yet. Any of you who can help me regarding this will be highly appreciated. Zubair Younas…

---

## [Recommended templating system](https://www.ruby-forum.com/t/recommended-templating-system/87986)

<div class="topic-metadata">

**Author:** [@Alexandru\_ESUngur](https://www.ruby-forum.com/u/Alexandru_ESUngur)\
**Replies:** 3\
**Last updated:** [March 28, 2006, 12:55pm UTC](https://www.ruby-forum.com/t/recommended-templating-system/87986 "2006-03-28T12:55:29Z")

</div>

Hi all, I’m new to Ruby, coming from PHP and Perl. I am looking for a good templating system to use for building web applications. So far I’ve found: cs/Template :: http://cstemplate.rubyforge.org/ PageTemplate :: h…

---

## [Subclasses and constants](https://www.ruby-forum.com/t/subclasses-and-constants/87496)

<div class="topic-metadata">

**Author:** [@lstrecv](https://www.ruby-forum.com/u/lstrecv)\
**Replies:** 5\
**Last updated:** [March 28, 2006, 10:35am UTC](https://www.ruby-forum.com/t/subclasses-and-constants/87496 "2006-03-28T10:35:21Z")

</div>

Often, I find myself doing: class RemoteCommand def submit sendto(URL, …) end end class GetStockPriceCommand URL = ‘http://…’ end Which won’t work. I’m forced to do: sendto(self.class::URL, …) which just seem…

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

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