# Ruby

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

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

---

## [Gem, Proxy and MS authentication](https://www.ruby-forum.com/t/gem-proxy-and-ms-authentication/59638)

<div class="topic-metadata">

**Author:** [@McDevittS\_Chris](https://www.ruby-forum.com/u/McDevittS_Chris)\
**Replies:** 2\
**Last updated:** [May 5, 2006, 1:59am UTC](https://www.ruby-forum.com/t/gem-proxy-and-ms-authentication/59638 "2006-05-05T01:59:18Z")

</div>

Has anyone figured out how to get gem to work with a proxy that use Microsoft authentication? -Chris

---

## [Ruby equivalent to simple awk program](https://www.ruby-forum.com/t/ruby-equivalent-to-simple-awk-program/59598)

<div class="topic-metadata">

**Author:** [@Bil\_K](https://www.ruby-forum.com/u/Bil_K)\
**Replies:** 9\
**Last updated:** [May 5, 2006, 12:24am UTC](https://www.ruby-forum.com/t/ruby-equivalent-to-simple-awk-program/59598 "2006-05-05T00:24:14Z")

</div>

Hello, I found this awk snippet in news:comp.lang.fortran this morning, and it made me realize that I don’t use Ruby as a \*nix filter as often as I probably should because I couldn’t duplicate the capability in “abou…

---

## [Broken Console](https://www.ruby-forum.com/t/broken-console/94475)

<div class="topic-metadata">

**Author:** [@idlefingers](https://www.ruby-forum.com/u/idlefingers)\
**Replies:** 5\
**Last updated:** [May 4, 2006, 10:24pm UTC](https://www.ruby-forum.com/t/broken-console/94475 "2006-05-04T22:24:24Z")

</div>

I just tried to boot up my app’s console and it seems either something is broken or I’ve done something wrong? Here’s what I’m doing… First i cd to my project then run the command ‘script/console development’ only to…

---

## [Searching Files](https://www.ruby-forum.com/t/searching-files/94376)

<div class="topic-metadata">

**Author:** [@nko](https://www.ruby-forum.com/u/nko)\
**Replies:** 13\
**Last updated:** [May 4, 2006, 8:31pm UTC](https://www.ruby-forum.com/t/searching-files/94376 "2006-05-04T20:31:52Z")

</div>

I’m trying to write a simple script to go through all the files in a specific directory and search for search terms. You should, hypothetically, be able to run: search search\_term and find all the applicable results.…

---

## [Concurrency question](https://www.ruby-forum.com/t/concurrency-question/59530)

<div class="topic-metadata">

**Author:** [@Trish\_Ball](https://www.ruby-forum.com/u/Trish_Ball)\
**Replies:** 6\
**Last updated:** [May 4, 2006, 7:58pm UTC](https://www.ruby-forum.com/t/concurrency-question/59530 "2006-05-04T19:58:20Z")

</div>

I am new to concurrency issues, and am working with DRb (also new to this). My DRb class assigns a value to an instance variable that will be accessed by my client. Is there a possibility with a concurrency issue if…

---

## [Receiving data through a VPN tunnel](https://www.ruby-forum.com/t/receiving-data-through-a-vpn-tunnel/59621)

<div class="topic-metadata">

**Author:** [@SSMKSM](https://www.ruby-forum.com/u/SSMKSM)\
**Replies:** 0\
**Last updated:** [May 4, 2006, 7:58pm UTC](https://www.ruby-forum.com/t/receiving-data-through-a-vpn-tunnel/59621 "2006-05-04T19:58:14Z")

</div>

Hello, I need to code a client that receives data (binary) from a server over a VPN tunnel. I did a search for some example code i could test/learn from but didnt find anything. Could someone please point me to some …

---

## [Greenbar 1.0](https://www.ruby-forum.com/t/greenbar-1-0/94476)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 5\
**Last updated:** [May 4, 2006, 7:55pm UTC](https://www.ruby-forum.com/t/greenbar-1-0/94476 "2006-05-04T19:55:09Z")

</div>

Announcing Greenbar. Greenbar is an open source project intended to aid in the writing of Test::Unit tests. It consists of a framework to aid in providing reusable chunks of setup and teardown code, and a handful of…

---

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

<div class="topic-metadata">

**Author:** [@wksmall](https://www.ruby-forum.com/u/wksmall)\
**Replies:** 0\
**Last updated:** [May 4, 2006, 7:33pm UTC](https://www.ruby-forum.com/t/fxri/94486 "2006-05-04T19:33:43Z")

</div>

FXRI on winxp is behaving strangely. It doesn’t look stuff up anymore, it just pastes stuff into the irb window when I click on the listing on the left. fxri 0.3.3 fxruby 1.4.4 Removing gem fxruby 1.4.4 leaving on…

---

## [Newbee Question on what if x === 2..5 does](https://www.ruby-forum.com/t/newbee-question-on-what-if-x-2-5-does/59544)

<div class="topic-metadata">

**Author:** [@robtotheb](https://www.ruby-forum.com/u/robtotheb)\
**Replies:** 7\
**Last updated:** [May 4, 2006, 5:49pm UTC](https://www.ruby-forum.com/t/newbee-question-on-what-if-x-2-5-does/59544 "2006-05-04T17:49:47Z")

</div>

I’m new to ruby and don’t understand why the following code does what is does. Can anyone enlighten me? ruby -e 'a = \[1,2,3,4,5,6,7,8,9,10\]; a.each { |x| if (x === 2…5 ) then print x, " " end}; puts ’ 2 3 4 5 6 7 8 9…

---

## [New thread for RUBY ftp problems . .](https://www.ruby-forum.com/t/new-thread-for-ruby-ftp-problems/59604)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 2\
**Last updated:** [May 4, 2006, 5:15pm UTC](https://www.ruby-forum.com/t/new-thread-for-ruby-ftp-problems/59604 "2006-05-04T17:15:50Z")

</div>

I’m starting a new thread, because, my problem appears even in the simplest try of RUBY’s ftp. Here’s a simple attempt to just ftp a file over to one of our UNIX servers here at my company. It’s left hanging after the…

---

## [Vim 7 ruby omni-complete 0.5](https://www.ruby-forum.com/t/vim-7-ruby-omni-complete-0-5/94483)

<div class="topic-metadata">

**Author:** [@bowenmark](https://www.ruby-forum.com/u/bowenmark)\
**Replies:** 0\
**Last updated:** [May 4, 2006, 5:00pm UTC](https://www.ruby-forum.com/t/vim-7-ruby-omni-complete-0-5/94483 "2006-05-04T17:00:09Z")

</div>

Once again after some work we have another release, with may bugfixes and improvements. If you missed the original announcement, rubycomplete provides a vim7 omni-completion function (code completion) for vim. It is b…

---

## [Installing Ruby on Unix](https://www.ruby-forum.com/t/installing-ruby-on-unix/94479)

<div class="topic-metadata">

**Author:** [@crenner](https://www.ruby-forum.com/u/crenner)\
**Replies:** 5\
**Last updated:** [May 4, 2006, 4:26pm UTC](https://www.ruby-forum.com/t/installing-ruby-on-unix/94479 "2006-05-04T16:26:04Z")

</div>

I am making the leap to learn Ruby and I have tried to follow some install instructions for installing Ruby on Unix. I am logged in as root and have done the following: autoconf ./configure The configure command ret…

---

## [A question about attr\_reader](https://www.ruby-forum.com/t/a-question-about-attr-reader/59603)

<div class="topic-metadata">

**Author:** [@Akbar\_P](https://www.ruby-forum.com/u/Akbar_P)\
**Replies:** 2\
**Last updated:** [May 4, 2006, 4:07pm UTC](https://www.ruby-forum.com/t/a-question-about-attr-reader/59603 "2006-05-04T16:07:20Z")

</div>

Hi All, I am just going through the pickacxe book and have a question about attr\_reader. Here is the sample class. class Song def initialize(name, artist, duration) @name = name @artist = artist @duration = durati…

---

## [Problems ftp'ing with RUBY](https://www.ruby-forum.com/t/problems-ftping-with-ruby/94382)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 12\
**Last updated:** [May 4, 2006, 3:53pm UTC](https://www.ruby-forum.com/t/problems-ftping-with-ruby/94382 "2006-05-04T15:53:33Z")

</div>

I need to ftp PDF files to our printer. Using the script below, I’m trying to do that, but, it ain’t working. It just sits there. I ftp manually to the same site to see if anything’s getting there, and, no, nothing is…

---

## [Class methods and protected instance methods](https://www.ruby-forum.com/t/class-methods-and-protected-instance-methods/59347)

<div class="topic-metadata">

**Author:** [@pie-r-squared](https://www.ruby-forum.com/u/pie-r-squared)\
**Replies:** 1\
**Last updated:** [May 4, 2006, 3:49pm UTC](https://www.ruby-forum.com/t/class-methods-and-protected-instance-methods/59347 "2006-05-04T15:49:02Z")

</div>

I would have thought that a class method context would be able to call protected methods on an instance of that class. That does not seem to be the case: class Foo def self.create\_with\_magic newfoo = new() newfoo.i…

---

## [Ruby idiom for attributes / properties](https://www.ruby-forum.com/t/ruby-idiom-for-attributes-properties/59555)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 12\
**Last updated:** [May 4, 2006, 3:39pm UTC](https://www.ruby-forum.com/t/ruby-idiom-for-attributes-properties/59555 "2006-05-04T15:39:49Z")

</div>

I’m writing a bunch of auto-marshaling code to let CLR code call back into Ruby. I just got the simplest possible marshaling scenario working today, which is letting you bind an Array of ActiveRecord objects to a CLR …

---

## [Unit test setup](https://www.ruby-forum.com/t/unit-test-setup/94368)

<div class="topic-metadata">

**Author:** [@taq](https://www.ruby-forum.com/u/taq)\
**Replies:** 12\
**Last updated:** [May 4, 2006, 2:47pm UTC](https://www.ruby-forum.com/t/unit-test-setup/94368 "2006-05-04T14:47:13Z")

</div>

Hi there. I noticed that when using unit testing the setup and destroy methods works for every test executed. Is there a way for use general “constructor” and “destructor” methods, to, for example, open a socket on …

---

## [YAML in limbo?](https://www.ruby-forum.com/t/yaml-in-limbo/94345)

<div class="topic-metadata">

**Author:** [@ohad](https://www.ruby-forum.com/u/ohad)\
**Replies:** 2\
**Last updated:** [May 4, 2006, 10:28am UTC](https://www.ruby-forum.com/t/yaml-in-limbo/94345 "2006-05-04T10:28:57Z")

</div>

When I was writing a simple DNS Sniffer/IDS (for a university project), I wanted to be able to export DNS responses to YAML, for later comparison (to detect spoofing). The IPAddr class was widely used within the proje…

---

## [IMAP disconnect broken?](https://www.ruby-forum.com/t/imap-disconnect-broken/58790)

<div class="topic-metadata">

**Author:** [@Bealach\_Na\_Bo](https://www.ruby-forum.com/u/Bealach_Na_Bo)\
**Replies:** 11\
**Last updated:** [May 4, 2006, 9:18am UTC](https://www.ruby-forum.com/t/imap-disconnect-broken/58790 "2006-05-04T09:18:40Z")

</div>

Hi folks, New R. convert here :slight\_smile: I’m using the standard Net::IMAP and OpenSSL libraries to connect to an IMAP server. I can connect, examine and manipulate my INBOX, but when call the disconnect method o…

---

## [Re: Golfing a signature](https://www.ruby-forum.com/t/re-golfing-a-signature/94465)

<div class="topic-metadata">

**Author:** [@dasch](https://www.ruby-forum.com/u/dasch)\
**Replies:** 1\
**Last updated:** [May 4, 2006, 8:30am UTC](https://www.ruby-forum.com/t/re-golfing-a-signature/94465 "2006-05-04T08:30:25Z")

</div>

And another bit: b\[i\]\[e\]=(n==2?b\[i\]\[e\]:n==3?o:f becomes: n!=2?b\[i\]\[e\]=n==3?o:f:f The z array can be reduced further q=(m=\[-1,0,1\])-\[0\];(m\*2+q).sort.zip(m+q+m).map{ becomes: m=\[-1,0,1\]\*3;(m.sort.zip(m)-\[\[0,0\]\]).ma…

---

## [Re-post: \[Mailing list -\> ruby-forum.com broken?\]](https://www.ruby-forum.com/t/re-post-mailing-list-ruby-forum-com-broken/59261)

<div class="topic-metadata">

**Author:** [@justincollins](https://www.ruby-forum.com/u/justincollins)\
**Replies:** 26\
**Last updated:** [May 4, 2006, 5:47am UTC](https://www.ruby-forum.com/t/re-post-mailing-list-ruby-forum-com-broken/59261 "2006-05-04T05:47:26Z")

</div>

I posted this on the mailing list, but obviously that didn’t get duplicated to the forum :slight\_smile: Sorry to those on the mailing list who have to see this twice: It looks like messages sent to the mailing list ar…

---

## [So I got a binary file](https://www.ruby-forum.com/t/so-i-got-a-binary-file/59189)

<div class="topic-metadata">

**Author:** [@bostonmacosx](https://www.ruby-forum.com/u/bostonmacosx)\
**Replies:** 9\
**Last updated:** [May 4, 2006, 3:26am UTC](https://www.ruby-forum.com/t/so-i-got-a-binary-file/59189 "2006-05-04T03:26:32Z")

</div>

Sorry for being such a NEWB. I’m a pretty prolific PHP writer however I’m new to RUBY and want to expand my horizons. I have a big-endian binary file and want to convert it to ascii so I see what’s in it. Is there an…

---

## [Re: Golfing a signature](https://www.ruby-forum.com/t/re-golfing-a-signature/94463)

<div class="topic-metadata">

**Author:** [@dasch](https://www.ruby-forum.com/u/dasch)\
**Replies:** 0\
**Last updated:** [May 4, 2006, 2:40am UTC](https://www.ruby-forum.com/t/re-golfing-a-signature/94463 "2006-05-04T02:40:30Z")

</div>

Also, somewhere along the line you changed what the program was actually doing - originally you produced a 20x21 grid, but that got reduced to a 20x20. I used this to make sure I didn’t change the program during golfi…

---

## [Re: Golfing a signature](https://www.ruby-forum.com/t/re-golfing-a-signature/59552)

<div class="topic-metadata">

**Author:** [@dasch](https://www.ruby-forum.com/u/dasch)\
**Replies:** 0\
**Last updated:** [May 4, 2006, 2:37am UTC](https://www.ruby-forum.com/t/re-golfing-a-signature/59552 "2006-05-04T02:37:27Z")

</div>

You can shave off another 12 characters by changing the construction of the “z” array: q,z=-1…1,\[\];q.map{|x|q.map{|y|z\<\<\[x,y\]}};(z-=\[\[0,0\]\]).map{ q=(m=\[-1,0,1\])-\[0\];(m\*2+q).sort.zip(m+q+m).map{ Firstly, z isn’t used …

---

## [Displaying only certain lines in the buffer](https://www.ruby-forum.com/t/displaying-only-certain-lines-in-the-buffer/94460)

<div class="topic-metadata">

**Author:** [@Gennady\_B](https://www.ruby-forum.com/u/Gennady_B)\
**Replies:** 1\
**Last updated:** [May 4, 2006, 2:10am UTC](https://www.ruby-forum.com/t/displaying-only-certain-lines-in-the-buffer/94460 "2006-05-04T02:10:13Z")

</div>

Sorry for totally off-topic question. I seem to remember that there’s a way to have vim display only certain lines in the buffer, like those satisfying a pattern. Unfortunately, I do not remember how to turn it on an…

---

## [Re: WEBrick initialisation problem](https://www.ruby-forum.com/t/re-webrick-initialisation-problem/94452)

<div class="topic-metadata">

**Author:** [@brianwisti](https://www.ruby-forum.com/u/brianwisti)\
**Replies:** 1\
**Last updated:** [May 4, 2006, 1:48am UTC](https://www.ruby-forum.com/t/re-webrick-initialisation-problem/94452 "2006-05-04T01:48:49Z")

</div>

Sent: 03 May 2006 17:40 To: ruby-talk ML Subject: Re: WEBrick initialisation problem On May 3, 2006, at 1:24 AM, Brian Watson wrote: I am new to Ruby so I thought the best way to get into it would be to follow …

---

## [Html stringScanner regexp](https://www.ruby-forum.com/t/html-stringscanner-regexp/59546)

<div class="topic-metadata">

**Author:** [@tomas](https://www.ruby-forum.com/u/tomas)\
**Replies:** 1\
**Last updated:** [May 4, 2006, 1:34am UTC](https://www.ruby-forum.com/t/html-stringscanner-regexp/59546 "2006-05-04T01:34:59Z")

</div>

Hi, I want to parse a html string like this: … title1 ... title2 ... title3 ... title4 ... “…” means other stuff. I need to extract title1 to title4, so I tried ScannerScan.scan(/.class=title\>(.)\</a\>\</div\>NE…

---

## [Ruby based editor](https://www.ruby-forum.com/t/ruby-based-editor/59302)

<div class="topic-metadata">

**Author:** [@splashlin](https://www.ruby-forum.com/u/splashlin)\
**Replies:** 19\
**Last updated:** [May 4, 2006, 1:29am UTC](https://www.ruby-forum.com/t/ruby-based-editor/59302 "2006-05-04T01:29:27Z")

</div>

Hi all, I’ve started to write my own editor (in c) which shall be extendible by via Ruby. I have a question about the design, as this is a ‘from scratch’ approach I’m taking do you think I should write the basics in …

---

## [Immediate if method](https://www.ruby-forum.com/t/immediate-if-method/59536)

<div class="topic-metadata">

**Author:** [@jamal86](https://www.ruby-forum.com/u/jamal86)\
**Replies:** 5\
**Last updated:** [May 4, 2006, 1:12am UTC](https://www.ruby-forum.com/t/immediate-if-method/59536 "2006-05-04T01:12:19Z")

</div>

Does Ruby have a built-in equivalent of what some other languages call an “immediate if” function? I want to conditionally return one of two strings on the status bar of an application, depending on whether a variabl…

---

## [Converting hex floats](https://www.ruby-forum.com/t/converting-hex-floats/59543)

<div class="topic-metadata">

**Author:** [@burrowsm](https://www.ruby-forum.com/u/burrowsm)\
**Replies:** 1\
**Last updated:** [May 4, 2006, 1:03am UTC](https://www.ruby-forum.com/t/converting-hex-floats/59543 "2006-05-04T01:03:11Z")

</div>

What is the easiest way to convert a hex value like: 0x000000000000F03F (big endian, IEEE754) to a Float in Ruby? Thanks, Matt

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

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