# Ruby

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

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

---

## [Is webunit still being maintained?](https://www.ruby-forum.com/t/is-webunit-still-being-maintained/66983)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 0\
**Last updated:** [August 30, 2006, 7:31pm UTC](https://www.ruby-forum.com/t/is-webunit-still-being-maintained/66983 "2006-08-30T19:31:47Z")

</div>

Rubies: I have an interest in WebUnit, but I notice its last code drop is a few years old. Then I notice that using it on Linux causes some irritations. I can report them if asked, but in general I’m interested to he…

---

## [Parsing CSV file with ruby](https://www.ruby-forum.com/t/parsing-csv-file-with-ruby/66967)

<div class="topic-metadata">

**Author:** [@dfg59](https://www.ruby-forum.com/u/dfg59)\
**Replies:** 4\
**Last updated:** [August 30, 2006, 7:07pm UTC](https://www.ruby-forum.com/t/parsing-csv-file-with-ruby/66967 "2006-08-30T19:07:44Z")

</div>

I’m currently trying to do something that seems rather simple but I’m slightly new to ruby. I want to read in a cvs file, find rows that are distinct with respect to one of the elements in the row (for example, all ro…

---

## [Easy question i hope](https://www.ruby-forum.com/t/easy-question-i-hope/66971)

<div class="topic-metadata">

**Author:** [@ghost](https://www.ruby-forum.com/u/ghost)\
**Replies:** 3\
**Last updated:** [August 30, 2006, 6:41pm UTC](https://www.ruby-forum.com/t/easy-question-i-hope/66971 "2006-08-30T18:41:40Z")

</div>

hi i need to strip out some boolean operators from search input this is what i need to remove params\[:search\_input\].gsub!(/AND|OR|&&|||/,’’) it all works except for || which i suppose is because it is interpreted as …

---

## [Matz' Wild Ideas: Annotations](https://www.ruby-forum.com/t/matz-wild-ideas-annotations/66573)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 8\
**Last updated:** [August 30, 2006, 6:25pm UTC](https://www.ruby-forum.com/t/matz-wild-ideas-annotations/66573 "2006-08-30T18:25:32Z")

</div>

I was looking at Matz’ Wild and Weird ideas \[1\]. He talks about annotations at one point and gives this example: @require: arg1 \>= 10 @overriding: true @visibility: public def foo(arg1) … end I’m not too keen on …

---

## [Overriding Class Methods With Modules](https://www.ruby-forum.com/t/overriding-class-methods-with-modules/66947)

<div class="topic-metadata">

**Author:** [@John\_WSLong](https://www.ruby-forum.com/u/John_WSLong)\
**Replies:** 5\
**Last updated:** [August 30, 2006, 5:19pm UTC](https://www.ruby-forum.com/t/overriding-class-methods-with-modules/66947 "2006-08-30T17:19:24Z")

</div>

How do I override a class method on an object with another module? For example: class TestObject def self.my\_method “override me” end end module TestExtension def my\_method “overridden by TestExtension” end de…

---

## [Finding classes](https://www.ruby-forum.com/t/finding-classes/66952)

<div class="topic-metadata">

**Author:** [@pazu](https://www.ruby-forum.com/u/pazu)\
**Replies:** 2\
**Last updated:** [August 30, 2006, 5:13pm UTC](https://www.ruby-forum.com/t/finding-classes/66952 "2006-08-30T17:13:23Z")

</div>

I need to find classes that either: Includes a specific module or Includes a specfic string in the class name Either of the two is fine. This is in a Rails environment where I want to find all classes using one o…

---

## [Why must LoadError be explicitly caught from require()](https://www.ruby-forum.com/t/why-must-loaderror-be-explicitly-caught-from-require/66946)

<div class="topic-metadata">

**Author:** [@benhiller](https://www.ruby-forum.com/u/benhiller)\
**Replies:** 4\
**Last updated:** [August 30, 2006, 4:52pm UTC](https://www.ruby-forum.com/t/why-must-loaderror-be-explicitly-caught-from-require/66946 "2006-08-30T16:52:34Z")

</div>

Why do I explicitly have to catch LoadError as thrown by ‘require’? The following code demonstrates my problem: begin require ‘not\_existent’ rescue print ‘I am never reached’ #rescue LoadError print “But uncommenti…

---

## [Simple counting problem (inside rOrails controller)](https://www.ruby-forum.com/t/simple-counting-problem-inside-rorails-controller/66895)

<div class="topic-metadata">

**Author:** [@jotto](https://www.ruby-forum.com/u/jotto)\
**Replies:** 1\
**Last updated:** [August 30, 2006, 3:41pm UTC](https://www.ruby-forum.com/t/simple-counting-problem-inside-rorails-controller/66895 "2006-08-30T15:41:13Z")

</div>

I want to count, perhaps with session variables, to ensure that the user is not abusing AJAX features. so on the particular page that has the ajax unless session\[:countcomment\] !=nil session\[:countcomment\] = 0.to\_i …

---

## [Evading the limit of a pipe's standard input](https://www.ruby-forum.com/t/evading-the-limit-of-a-pipes-standard-input/66857)

<div class="topic-metadata">

**Author:** [@Ashley\_M](https://www.ruby-forum.com/u/Ashley_M)\
**Replies:** 7\
**Last updated:** [August 30, 2006, 3:11pm UTC](https://www.ruby-forum.com/t/evading-the-limit-of-a-pipes-standard-input/66857 "2006-08-30T15:11:09Z")

</div>

Hi I’m trying to write a tool that generates a really long SQL script and passes it to psql, but I’ve hit a problem because my script is too long to be sent to the stdin of psql. This is the first time I’ve run into…

---

## [Ruby\_1\_8 dumps core](https://www.ruby-forum.com/t/ruby-1-8-dumps-core/66939)

<div class="topic-metadata">

**Author:** [@Masatoshi\_SEKI](https://www.ruby-forum.com/u/Masatoshi_SEKI)\
**Replies:** 0\
**Last updated:** [August 30, 2006, 2:23pm UTC](https://www.ruby-forum.com/t/ruby-1-8-dumps-core/66939 "2006-08-30T14:23:02Z")

</div>

e$B31$H$$$$$^$9!#e(B 1.8e$B$N%V%i%s%A$Ne(BRubye$B$,e(Bcoree$B$rEG$$$F$7$^$$$^$9!#e(B RWikie$B$r2~B$$7$?%W%m%0%i%\`$J$s$G$9$,!"$$$m$$$m;n$7$?$N$G$9$,e(B e$B:F8=$9$k:G\>.$N%9%/%j%W%H$r:n$k$3$H$O$^$@$G$-$F$^$;$s!#e(B $ ru…

---

## [Best practice? own libs](https://www.ruby-forum.com/t/best-practice-own-libs/66581)

<div class="topic-metadata">

**Author:** [@pgundlach](https://www.ruby-forum.com/u/pgundlach)\
**Replies:** 4\
**Last updated:** [August 30, 2006, 1:46pm UTC](https://www.ruby-forum.com/t/best-practice-own-libs/66581 "2006-08-30T13:46:00Z")

</div>

Hi, I’d like to ask you for your recommendations. I develop (privately) a set of libraries which are used in several projects. Some of these I also want to share with others (i.e. distribute). When developing I use a…

---

## [Server maintenance](https://www.ruby-forum.com/t/server-maintenance/66907)

<div class="topic-metadata">

**Author:** [@Shugo\_M](https://www.ruby-forum.com/u/Shugo_M)\
**Replies:** 1\
**Last updated:** [August 30, 2006, 11:40am UTC](https://www.ruby-forum.com/t/server-maintenance/66907 "2006-08-30T11:40:45Z")

</div>

Hi, Services except mailinglists will be down for a server maintenance on Wed Aug 30 08:00:00 UTC 2006. The downtime will be a few hours. Sorry for inconvenience. Shugo

---

## [ENV values](https://www.ruby-forum.com/t/env-values/66914)

<div class="topic-metadata">

**Author:** [@0ffh](https://www.ruby-forum.com/u/0ffh)\
**Replies:** 4\
**Last updated:** [August 30, 2006, 11:36am UTC](https://www.ruby-forum.com/t/env-values/66914 "2006-08-30T11:36:42Z")

</div>

Hi all, I’m working on an ssh script where I’d like to read out console dimensions to adjust the output window - the default value of 80x24 isn’t that good. :wink: So I thought it should work by simply reading out th…

---

## [Hash#inject argument syntax](https://www.ruby-forum.com/t/hash-inject-argument-syntax/66880)

<div class="topic-metadata">

**Author:** [@brian](https://www.ruby-forum.com/u/brian)\
**Replies:** 2\
**Last updated:** [August 30, 2006, 10:56am UTC](https://www.ruby-forum.com/t/hash-inject-argument-syntax/66880 "2006-08-30T10:56:29Z")

</div>

The code below works but I do not understand the “(key, value)” parenthesis syntax. I have not seen it before. Could someone explain? –Brian (from Rails’ active\_support) class Hash def symbolize\_keys inject({})…

---

## [Gem spec and C Ruby extension](https://www.ruby-forum.com/t/gem-spec-and-c-ruby-extension/66911)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [August 30, 2006, 8:16am UTC](https://www.ruby-forum.com/t/gem-spec-and-c-ruby-extension/66911 "2006-08-30T08:16:11Z")

</div>

i’m reading both : Gemspec Reference http://docs.rubygems.org/read/chapter/20#toc and DeveloperGuide http://rubygems.rubyforge.org/wiki/wiki.pl?DeveloperGuide however i don’t see any example to produce a “binary” gem…

---

## [Openssl PKCS7 and signed-enveloped data](https://www.ruby-forum.com/t/openssl-pkcs7-and-signed-enveloped-data/66910)

<div class="topic-metadata">

**Author:** [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Replies:** 0\
**Last updated:** [August 30, 2006, 8:04am UTC](https://www.ruby-forum.com/t/openssl-pkcs7-and-signed-enveloped-data/66910 "2006-08-30T08:04:10Z")

</div>

I’m looking at the tests for openssl and inspecting the PKCS7 classes with .methods, and I can’t find a way to create signed-enveloped data with openssl. I can create signed data and enveloped data, but not the signe…

---

## [Using define\_method to create a method that takes arguments](https://www.ruby-forum.com/t/using-define-method-to-create-a-method-that-takes-arguments/66908)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 2\
**Last updated:** [August 30, 2006, 7:42am UTC](https://www.ruby-forum.com/t/using-define-method-to-create-a-method-that-takes-arguments/66908 "2006-08-30T07:42:07Z")

</div>

How does one use define\_method to create a method that can take arguments? Is that possible? Wes

---

## [Can Anyone Explain This Memory Leak?](https://www.ruby-forum.com/t/can-anyone-explain-this-memory-leak/66398)

<div class="topic-metadata">

**Author:** [@Zed\_S](https://www.ruby-forum.com/u/Zed_S)\
**Replies:** 22\
**Last updated:** [August 30, 2006, 6:58am UTC](https://www.ruby-forum.com/t/can-anyone-explain-this-memory-leak/66398 "2006-08-30T06:58:04Z")

</div>

Hi Folks, Sorry to get your attention. :slight\_smile: There’s a very strange problem with Mongrel where if Threads are created because of the Mutex around Rails dispatching, then lots of ram gets created that never …

---

## [Float#hash collision](https://www.ruby-forum.com/t/float-hash-collision/66287)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [August 30, 2006, 5:03am UTC](https://www.ruby-forum.com/t/float-hash-collision/66287 "2006-08-30T05:03:56Z")

</div>

e$B$J$+$@$G$9!#e(B Float#hashe$B$,0\[MM$K\>WFM$9$k$h$&$G$9!#0J2\<$N%3!\<%I$GD4$Y$F$\_$k$H!"e(B e$BM-8zN($Oe(B5%e$BDxEY$G$9!#e(B a = Array.new(10\_000) {rand} h = Hash.new(0) a.each {|x| h\[x.hash\] += 1} p h.size.to\_f / a.…

---

## [DBI and MS SQL server 2000 problems](https://www.ruby-forum.com/t/dbi-and-ms-sql-server-2000-problems/66898)

<div class="topic-metadata">

**Author:** [@Tim\_U](https://www.ruby-forum.com/u/Tim_U)\
**Replies:** 0\
**Last updated:** [August 30, 2006, 4:53am UTC](https://www.ruby-forum.com/t/dbi-and-ms-sql-server-2000-problems/66898 "2006-08-30T04:53:18Z")

</div>

There is something seriously wrong with DBI support for SQL server. I have tried both DBI::ODBC and DBI:ADO and the following code always fails. ---------- Code require ‘dbi’ host= “DEVELOPMENT\_DATABASE\_SERVER” dat…

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/66843)

<div class="topic-metadata">

**Author:** [@mer](https://www.ruby-forum.com/u/mer)\
**Replies:** 4\
**Last updated:** [August 30, 2006, 3:37am UTC](https://www.ruby-forum.com/t/no-subject/66843 "2006-08-30T03:37:13Z")

</div>

Hi I am new to ruby, Does anyone know how to install ruby on Cygwin?

---

## [Latest Ruby on older RedHat Linux](https://www.ruby-forum.com/t/latest-ruby-on-older-redhat-linux/66883)

<div class="topic-metadata">

**Author:** [@Alvin\_R](https://www.ruby-forum.com/u/Alvin_R)\
**Replies:** 1\
**Last updated:** [August 30, 2006, 2:21am UTC](https://www.ruby-forum.com/t/latest-ruby-on-older-redhat-linux/66883 "2006-08-30T02:21:09Z")

</div>

Hi folks, Nuby here - another ex Java stooge;-) I have Ruby 1.6 on a production box running RetHad Linux 9 and I cannot upgrade the OS now but I wish to run r1.8 and Rails. What is the easiest and quickest way?:- S…

---

## [Comparing Dates](https://www.ruby-forum.com/t/comparing-dates/66879)

<div class="topic-metadata">

**Author:** [@parvg](https://www.ruby-forum.com/u/parvg)\
**Replies:** 2\
**Last updated:** [August 30, 2006, 1:05am UTC](https://www.ruby-forum.com/t/comparing-dates/66879 "2006-08-30T01:05:02Z")

</div>

Hi, This might be simple question for some you so. I’m trying to compare today’s dates with another date, which is in the format of mm/dd/yy. Can somebody help? I tried the following, but it doesn’t work: require ‘…

---

## [Process based locks for files](https://www.ruby-forum.com/t/process-based-locks-for-files/66865)

<div class="topic-metadata">

**Author:** [@Radu\_S](https://www.ruby-forum.com/u/Radu_S)\
**Replies:** 5\
**Last updated:** [August 30, 2006, 12:49am UTC](https://www.ruby-forum.com/t/process-based-locks-for-files/66865 "2006-08-30T00:49:00Z")

</div>

Hi, I have two programs accessing the same file. Both programs open and close the file multiple times while running (for example reading it first, and then writing it back using global functions). In order to avoid r…

---

## [\]RubyConf 2006 ticket for sale](https://www.ruby-forum.com/t/rubyconf-2006-ticket-for-sale/66876)

<div class="topic-metadata">

**Author:** [@deanhiller](https://www.ruby-forum.com/u/deanhiller)\
**Replies:** 0\
**Last updated:** [August 30, 2006, 12:10am UTC](https://www.ruby-forum.com/t/rubyconf-2006-ticket-for-sale/66876 "2006-08-30T00:10:56Z")

</div>

I won’t be able to make it to RubyConf, so I’ve got a ticket available. I was waitlisted, so it doesn’t include the food. First come first serve: the first person to respond directly to me with a definite interest I w…

---

## [Testing a string's value is a positive integer](https://www.ruby-forum.com/t/testing-a-strings-value-is-a-positive-integer/66833)

<div class="topic-metadata">

**Author:** [@jimdeuc](https://www.ruby-forum.com/u/jimdeuc)\
**Replies:** 9\
**Last updated:** [August 29, 2006, 11:14pm UTC](https://www.ruby-forum.com/t/testing-a-strings-value-is-a-positive-integer/66833 "2006-08-29T23:14:51Z")

</div>

Hi, I’m trying to find an nice way of verifying that the value of a String object (from the RoR params) contains a positive integer value. Casting my string to\_i and then testing that it is\_a(Numeric) and is \> 0 does…

---

## [Test::Unit::TestCase not resolving correctly](https://www.ruby-forum.com/t/test-testcase-not-resolving-correctly/66869)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [August 29, 2006, 11:04pm UTC](https://www.ruby-forum.com/t/test-testcase-not-resolving-correctly/66869 "2006-08-29T23:04:49Z")

</div>

I have test case that is failing. =============================================================== Failure: testProj(TestProject) \[---------\\TestProject.rb:26\]: \<“068906”\> expected but was \<“68906”\>. 1 tests, 1 asser…

---

## [Ruby-VPI 7.0.0](https://www.ruby-forum.com/t/ruby-vpi-7-0-0/66859)

<div class="topic-metadata">

**Author:** [@Suraj\_NSKurapati](https://www.ruby-forum.com/u/Suraj_NSKurapati)\
**Replies:** 0\
**Last updated:** [August 29, 2006, 9:16pm UTC](https://www.ruby-forum.com/t/ruby-vpi-7-0-0/66859 "2006-08-29T21:16:25Z")

</div>

\-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Version 7.0.0 (2006-08-29) Ruby-VPI is a Ruby interface to Verilog VPI. It lets you create complex Verilog test benches easily and wholly in Ruby. Web site: http://ruby…

---

## [Singleton classes and methods (was Re: Reformat Ruby source](https://www.ruby-forum.com/t/singleton-classes-and-methods-was-re-reformat-ruby-source/66835)

<div class="topic-metadata">

**Author:** [@rykkers](https://www.ruby-forum.com/u/rykkers)\
**Replies:** 4\
**Last updated:** [August 29, 2006, 8:54pm UTC](https://www.ruby-forum.com/t/singleton-classes-and-methods-was-re-reformat-ruby-source/66835 "2006-08-29T20:54:19Z")

</div>

On 8/28/06, James Edward G. II removed\_email\_address@domain.invalid wrote: On Aug 28, 2006, at 12:26 PM, Robert D. wrote: Not at all. That’s why I said “singleton class” in the first place. Hey man, all this singl…

---

## [Fwd: Please Forward-Ruby Quiz Submission #92](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission-92/229088)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [August 29, 2006, 8:42pm UTC](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission-92/229088 "2006-08-29T20:42:17Z")

</div>

Begin forwarded message:

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

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