# Ruby

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

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

---

## [Net/ssh: corrupted mac detected](https://www.ruby-forum.com/t/net-ssh-corrupted-mac-detected/51649)

<div class="topic-metadata">

**Author:** [@itsme213](https://www.ruby-forum.com/u/itsme213)\
**Replies:** 2\
**Last updated:** [January 5, 2006, 10:05am UTC](https://www.ruby-forum.com/t/net-ssh-corrupted-mac-detected/51649 "2006-01-05T10:05:28Z")

</div>

Never did quite get past this error when using net/ssh. Any suggestions? \[I did have the ISP upgrade their ssh some time ago, but they also migrated servers so I can’t be sure\]. Any ideas? Thanks! (this is from withi…

---

## [Extreme dynamism examples for showing off Ruby power](https://www.ruby-forum.com/t/extreme-dynamism-examples-for-showing-off-ruby-power/56167)

<div class="topic-metadata">

**Author:** [@dnstevenson](https://www.ruby-forum.com/u/dnstevenson)\
**Replies:** 3\
**Last updated:** [January 5, 2006, 9:53am UTC](https://www.ruby-forum.com/t/extreme-dynamism-examples-for-showing-off-ruby-power/56167 "2006-01-05T09:53:25Z")

</div>

Hi All, I’m giving a presentation to my research group next month about Ruby (mainly an intro), but seeing as though it’s in a Computer Science department, with plenty of people who have several decades of programmin…

---

## [Question on iterating a hash](https://www.ruby-forum.com/t/question-on-iterating-a-hash/51631)

<div class="topic-metadata">

**Author:** [@phil\_swenson](https://www.ruby-forum.com/u/phil_swenson)\
**Replies:** 16\
**Last updated:** [January 5, 2006, 9:44am UTC](https://www.ruby-forum.com/t/question-on-iterating-a-hash/51631 "2006-01-05T09:44:25Z")

</div>

I have a hash that looks like this : {“1”=\>"0, “3”=“1”, “45”=\>“1”, “101”=\>“0”} What I want is an array of all the keys that have hash values equal to “1” \[“3”,“45”\] in this case. Yeah, i can just iterate the keys… bu…

---

## [Can't change the value of self](https://www.ruby-forum.com/t/cant-change-the-value-of-self/51509)

<div class="topic-metadata">

**Author:** [@johanatan](https://www.ruby-forum.com/u/johanatan)\
**Replies:** 13\
**Last updated:** [January 5, 2006, 7:29am UTC](https://www.ruby-forum.com/t/cant-change-the-value-of-self/51509 "2006-01-05T07:29:12Z")

</div>

This code: class Time Rounds a time sensibly. Currently just hour is supported (as that’s the only one needed) def round\_to(unit = :hour) unless min == 0 new\_hour = hour new\_hour += 1 if min \> 30 time = Time.local…

---

## [Net::Telnet and sysread()](https://www.ruby-forum.com/t/net-telnet-and-sysread/51652)

<div class="topic-metadata">

**Author:** [@combray](https://www.ruby-forum.com/u/combray)\
**Replies:** 0\
**Last updated:** [January 5, 2006, 7:26am UTC](https://www.ruby-forum.com/t/net-telnet-and-sysread/51652 "2006-01-05T07:26:11Z")

</div>

I’m trying establish a telnet connection to nethack.alt.org. I can get a connection but Net::Telnet cannot seem to handle the output. In reading net/telnet.rb I found out about IO#sysread so i put this little tnet.r…

---

## [IRC like interface](https://www.ruby-forum.com/t/irc-like-interface/56155)

<div class="topic-metadata">

**Author:** [@juergen](https://www.ruby-forum.com/u/juergen)\
**Replies:** 3\
**Last updated:** [January 5, 2006, 3:33am UTC](https://www.ruby-forum.com/t/irc-like-interface/56155 "2006-01-05T03:33:48Z")

</div>

Hi, I would like to try to write a text based Jabber client in Ruby, but being that I am rather new to it, I am running into problems already: I would like a text based user interface that looks somewhat like the cla…

---

## [Newbie - Problem One - Ruby and MySQL](https://www.ruby-forum.com/t/newbie-problem-one-ruby-and-mysql/56163)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [January 5, 2006, 2:39am UTC](https://www.ruby-forum.com/t/newbie-problem-one-ruby-and-mysql/56163 "2006-01-05T02:39:41Z")

</div>

I have ruby, apache and MySQL installed via instantrailson Windows XP sp2. All work independently OK. I am attempting to access the MySQL, but up to now no success. After searching the web. have tried require ‘dbi’ r…

---

## [Uploading data to MS SQL Server - problem with quote charact](https://www.ruby-forum.com/t/uploading-data-to-ms-sql-server-problem-with-quote-charact/51646)

<div class="topic-metadata">

**Author:** [@samckayak](https://www.ruby-forum.com/u/samckayak)\
**Replies:** 0\
**Last updated:** [January 5, 2006, 2:06am UTC](https://www.ruby-forum.com/t/uploading-data-to-ms-sql-server-problem-with-quote-charact/51646 "2006-01-05T02:06:38Z")

</div>

Hi, I’m a ruby newbie. On one project I have, I need to upload data coming from Oracle database to an MS SQL Server. But I’m having problems inserting if data contains a quote (’) character. Is there a method with…

---

## [Fxri incomplete](https://www.ruby-forum.com/t/fxri-incomplete/89572)

<div class="topic-metadata">

**Author:** [@X-Man](https://www.ruby-forum.com/u/X-Man)\
**Replies:** 3\
**Last updated:** [January 5, 2006, 1:27am UTC](https://www.ruby-forum.com/t/fxri-incomplete/89572 "2006-01-05T01:27:31Z")

</div>

I like fxri but why is it that some very essential libraries, e.g. the socket library (with classes TCPSocket, TCPServer, etc.), are not included? It is sad that fxri is so crippled. I have to grab the PickAxe2 book …

---

## [Connecting to Oracle](https://www.ruby-forum.com/t/connecting-to-oracle/51634)

<div class="topic-metadata">

**Author:** [@DayS\_Chuck](https://www.ruby-forum.com/u/DayS_Chuck)\
**Replies:** 1\
**Last updated:** [January 5, 2006, 1:15am UTC](https://www.ruby-forum.com/t/connecting-to-oracle/51634 "2006-01-05T01:15:30Z")

</div>

I’m getting an error stating: “The procedure entry point OCIServerRelease could not be located in the dynamic link library OCI.dll.” The following are points: I installed ActiveRecord I then installed mswin-oci(i.e. …

---

## [Re: Proposed new rule](https://www.ruby-forum.com/t/re-proposed-new-rule/51642)

<div class="topic-metadata">

**Author:** [@warren\_b](https://www.ruby-forum.com/u/warren_b)\
**Replies:** 1\
**Last updated:** [January 5, 2006, 1:12am UTC](https://www.ruby-forum.com/t/re-proposed-new-rule/51642 "2006-01-05T01:12:29Z")

</div>

James, Warren are you using a threading MUA? I use Outlook, which \*can\* thread, but since ruby-talk is such a high-volume list with a very low signal to noise ratio, I usually just scan subject lines in a non-threa…

---

## [Pure Ruby/Proxy Oracle Driver?](https://www.ruby-forum.com/t/pure-ruby-proxy-oracle-driver/89483)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [January 5, 2006, 1:01am UTC](https://www.ruby-forum.com/t/pure-ruby-proxy-oracle-driver/89483 "2006-01-05T01:01:31Z")

</div>

Is there an an equivalent of perl’s DBD::Proxy for ruby? I’m working with a rails app that speaks to an oracle database but I’d like to deploy on FreeBSD (where there are no native oracle libraries available). A pure …

---

## [Red cloth question](https://www.ruby-forum.com/t/red-cloth-question/89570)

<div class="topic-metadata">

**Author:** [@Sean\_T\_Allen](https://www.ruby-forum.com/u/Sean_T_Allen)\
**Replies:** 2\
**Last updated:** [January 5, 2006, 12:05am UTC](https://www.ruby-forum.com/t/red-cloth-question/89570 "2006-01-05T00:05:33Z")

</div>

can someone point me in the direction of documentation for tweaking red cloth? in particular i want to have it make all hrefs be thanks for any help.

---

## [Rio-0.3.4: rio#mkdir fails](https://www.ruby-forum.com/t/rio-0-3-4-rio-mkdir-fails/51610)

<div class="topic-metadata">

**Author:** [@wybodekker](https://www.ruby-forum.com/u/wybodekker)\
**Replies:** 2\
**Last updated:** [January 4, 2006, 11:53pm UTC](https://www.ruby-forum.com/t/rio-0-3-4-rio-mkdir-fails/51610 "2006-01-04T23:53:30Z")

</div>

Is there anybody on this list with: ruby 1.8.3 or 1.8.4 and rio-0.3.4 who can run this: require ‘rubygems’ require ‘rio’ p rio(??).mkdir.path without getting an error message?

---

## [Potential RCR: method\_missing convention, opinions?](https://www.ruby-forum.com/t/potential-rcr-method-missing-convention-opinions/89145)

<div class="topic-metadata">

**Author:** [@Logan\_C](https://www.ruby-forum.com/u/Logan_C)\
**Replies:** 3\
**Last updated:** [January 4, 2006, 11:47pm UTC](https://www.ruby-forum.com/t/potential-rcr-method-missing-convention-opinions/89145 "2006-01-04T23:47:28Z")

</div>

I was pondering the other day, and an idea regarding “method\_missing” came to me. I don’t want to make this a full-fledged RCR just yet because I want some feedback first, I feel like this is one of those ideas that t…

---

## [Repost: singleton methods vs. class instance vars](https://www.ruby-forum.com/t/repost-singleton-methods-vs-class-instance-vars/89481)

<div class="topic-metadata">

**Author:** [@Peter\_Lacey](https://www.ruby-forum.com/u/Peter_Lacey)\
**Replies:** 8\
**Last updated:** [January 4, 2006, 11:47pm UTC](https://www.ruby-forum.com/t/repost-singleton-methods-vs-class-instance-vars/89481 "2006-01-04T23:47:27Z")

</div>

Hi, Please excuse me if this message was already delivered. I’m sending it again as I suspect something went wrong with my original post because it didn’t get cross-posted to comp.lang.ruby and there were no replie…

---

## [Blk.call vs. yield (possible bug?)](https://www.ruby-forum.com/t/blk-call-vs-yield-possible-bug/51536)

<div class="topic-metadata">

**Author:** [@Dominik\_B](https://www.ruby-forum.com/u/Dominik_B)\
**Replies:** 3\
**Last updated:** [January 4, 2006, 11:08pm UTC](https://www.ruby-forum.com/t/blk-call-vs-yield-possible-bug/51536 "2006-01-04T23:08:11Z")

</div>

Hello, I always thought that the following 4 methods should be equivalent if they are called with one argument: def t1(\*a) yield \*a end def t2(\*a, &blk) blk.call(\*a) end def t3(a) yield a end def t4(a, &blk) …

---

## [Newbie tearing hair out](https://www.ruby-forum.com/t/newbie-tearing-hair-out/89331)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 9\
**Last updated:** [January 4, 2006, 10:46pm UTC](https://www.ruby-forum.com/t/newbie-tearing-hair-out/89331 "2006-01-04T22:46:33Z")

</div>

I am trying to get to grips with ruby as an alternative to PHP. My plan is to convert a simple PHP application to ruby, as I definitely like the language better from what I have seen. I have downloaded instantrails an…

---

## [Silly regex question](https://www.ruby-forum.com/t/silly-regex-question/89140)

<div class="topic-metadata">

**Author:** [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Replies:** 14\
**Last updated:** [January 4, 2006, 10:07pm UTC](https://www.ruby-forum.com/t/silly-regex-question/89140 "2006-01-04T22:07:01Z")

</div>

Can someone help me make this code not suck? require ‘test/unit’ EWWWWWWW def process\_string str result = Hash.new str.to\_a.each do |line| line.scan(/important (\[a-zA-Z0-9\]+): /) do |key| result\[key.first\] = line …

---

## [Method &block question](https://www.ruby-forum.com/t/method-block-question/89567)

<div class="topic-metadata">

**Author:** [@SSSISO-8859-1SQSSim](https://www.ruby-forum.com/u/SSSISO-8859-1SQSSim)\
**Replies:** 1\
**Last updated:** [January 4, 2006, 9:39pm UTC](https://www.ruby-forum.com/t/method-block-question/89567 "2006-01-04T21:39:49Z")

</div>

Hi, could someone please put a finger on the point i’m missing? source: def test \*a p a end \[\[1,2\], \[3,4\]\].each &method(:test) puts “-----” \[\[1,2\], \[3,4\]\].each &method(:p) puts “-----” \[\[1,2\], \[3,4\]\].each {|e| p…

---

## [What Continuous Integration Tool?](https://www.ruby-forum.com/t/what-continuous-integration-tool/89427)

<div class="topic-metadata">

**Author:** [@danhobbs](https://www.ruby-forum.com/u/danhobbs)\
**Replies:** 3\
**Last updated:** [January 4, 2006, 8:03pm UTC](https://www.ruby-forum.com/t/what-continuous-integration-tool/89427 "2006-01-04T20:03:24Z")

</div>

Greetings, I’ve a project going that has multiple team members, supports multiple processor architectures and multiple languages. We’re writing in Ruby (with test cases) and we interface to c and c++ using swig. Conf…

---

## [Implicit block parameter?](https://www.ruby-forum.com/t/implicit-block-parameter/87745)

<div class="topic-metadata">

**Author:** [@ross\_b](https://www.ruby-forum.com/u/ross_b)\
**Replies:** 32\
**Last updated:** [January 4, 2006, 8:03pm UTC](https://www.ruby-forum.com/t/implicit-block-parameter/87745 "2006-01-04T20:03:23Z")

</div>

Hi, Probably this has been considered before, but I’ll ask anyway. Before I used Ruby, I used Groovy. In some ways they are (well, were anyway) quite similar, and one feature that I found cool in Groovy that I often…

---

## [Is there a way to clear the contents of a terminal?](https://www.ruby-forum.com/t/is-there-a-way-to-clear-the-contents-of-a-terminal/89323)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 14\
**Last updated:** [January 4, 2006, 7:45pm UTC](https://www.ruby-forum.com/t/is-there-a-way-to-clear-the-contents-of-a-terminal/89323 "2006-01-04T19:45:16Z")

</div>

Hi Chaps, MATLAB uses cls, in a bash shell I’d use clear. Is there a way to clear the contents of a terminal -safely-?

---

## [Event framework?](https://www.ruby-forum.com/t/event-framework/89019)

<div class="topic-metadata">

**Author:** [@markthomas](https://www.ruby-forum.com/u/markthomas)\
**Replies:** 5\
**Last updated:** [January 4, 2006, 6:50pm UTC](https://www.ruby-forum.com/t/event-framework/89019 "2006-01-04T18:50:57Z")

</div>

I dabble in home automation and am looking for a framework that would allow me to monitor and react to serial port events. I’m a long-time Perl user and if anyone is familiar with POE, that’s the type of framework I’m…

---

## [Building parse.o](https://www.ruby-forum.com/t/building-parse-o/89144)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [January 4, 2006, 6:38pm UTC](https://www.ruby-forum.com/t/building-parse-o/89144 "2006-01-04T18:38:55Z")

</div>

Hey, I’ve got this HP-UX 11i box which I’m trying to build Ruby 1.8.4 on. gcc 3.3.2. Things go well, except it dies on parse.o: gcc -g -O2 -DRUBY\_EXPORT -I. -I. -c parse.c In file included from parse.y:3338: …

---

## [Newbie question about nested sort](https://www.ruby-forum.com/t/newbie-question-about-nested-sort/51614)

<div class="topic-metadata">

**Author:** [@grehom](https://www.ruby-forum.com/u/grehom)\
**Replies:** 9\
**Last updated:** [January 4, 2006, 6:17pm UTC](https://www.ruby-forum.com/t/newbie-question-about-nested-sort/51614 "2006-01-04T18:17:38Z")

</div>

what am I doing wrong? I wanted to sort primarily on count (second position in array), then sub-sort alphabetically (first position in array) char\_freq = \[\[“c”, 2\],\[“b”, 5\],\[“a”, 2\]\] sorted\_freq = char\_freq.sort {|a…

---

## [Gets bug?](https://www.ruby-forum.com/t/gets-bug/89426)

<div class="topic-metadata">

**Author:** [@Shea\_M](https://www.ruby-forum.com/u/Shea_M)\
**Replies:** 3\
**Last updated:** [January 4, 2006, 6:17pm UTC](https://www.ruby-forum.com/t/gets-bug/89426 "2006-01-04T18:17:38Z")

</div>

if ARGV.size \> 0 puts "first arg is #{ARGV\[0\]}" end puts "enter text" ans = gets puts "you said #{ans}" Run this code, as ./test.rb. Then run it with an command line arg, like “./test.rb -x”. And you will get an…

---

## [Phoenix Ruby Users Group January Meeting (reminder)](https://www.ruby-forum.com/t/phoenix-ruby-users-group-january-meeting-reminder/51623)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [January 4, 2006, 6:12pm UTC](https://www.ruby-forum.com/t/phoenix-ruby-users-group-january-meeting-reminder/51623 "2006-01-04T18:12:52Z")

</div>

Just reminder for you desert dwellers: The 2006 kickoff meeting of the Phoenix Ruby U. Group will be on January 9th, at 6:15 pm, at Cyclone Commerce. Details may be found at aka http://rubyurl.com/AKZ There’s als…

---

## [Is this a YAML bug?](https://www.ruby-forum.com/t/is-this-a-yaml-bug/51620)

<div class="topic-metadata">

**Author:** [@jim](https://www.ruby-forum.com/u/jim)\
**Replies:** 0\
**Last updated:** [January 4, 2006, 6:12pm UTC](https://www.ruby-forum.com/t/is-this-a-yaml-bug/51620 "2006-01-04T18:12:41Z")

</div>

The code: require “http-access2” require “yaml” client = HTTPClient.new File.open(“client.yml”, “w”) do |file| file.puts client.to\_yaml end client2 = YAML.load( File.read( “client.yml” )) p client2 The error: /…

---

## [Re: Newbie question about nested sort](https://www.ruby-forum.com/t/re-newbie-question-about-nested-sort/51615)

<div class="topic-metadata">

**Author:** [@KroegerS\_Simon\_Sext](https://www.ruby-forum.com/u/KroegerS_Simon_Sext)\
**Replies:** 1\
**Last updated:** [January 4, 2006, 2:49pm UTC](https://www.ruby-forum.com/t/re-newbie-question-about-nested-sort/51615 "2006-01-04T14:49:28Z")

</div>

print d\[0\]\*d\[1\] end \[…\] Generally you need to do conditional evaluation based on higher prio results. Using “||” or “or” won’t help here (dunno what Perl does here). You want something like \[…\] hmmm, I don’t…

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

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