# Ruby

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

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

---

## [Re : Set intersection with a specific criteria: a better idi](https://www.ruby-forum.com/t/re-set-intersection-with-a-specific-criteria-a-better-idi/105655)

<div class="topic-metadata">

**Author:** [@kuyarico](https://www.ruby-forum.com/u/kuyarico)\
**Replies:** 0\
**Last updated:** [June 1, 2007, 2:21am UTC](https://www.ruby-forum.com/t/re-set-intersection-with-a-specific-criteria-a-better-idi/105655 "2007-06-01T02:21:32Z")

</div>

Thanks Joel, Do you think this could/should be added to the standard library or to the Facets library? Eric. Eric TORREBORRE tel: +81 (0)90 5580 3280 e-mail: removed\_email\_address@domain.invalid / removed\_email\_a…

---

## [Trying to send an email with attachments](https://www.ruby-forum.com/t/trying-to-send-an-email-with-attachments/105632)

<div class="topic-metadata">

**Author:** [@grooveska](https://www.ruby-forum.com/u/grooveska)\
**Replies:** 0\
**Last updated:** [May 31, 2007, 9:36pm UTC](https://www.ruby-forum.com/t/trying-to-send-an-email-with-attachments/105632 "2007-05-31T21:36:05Z")

</div>

I am working on a script that will send an email with a .csv file attachment. I can get everything set correctly, and the email gets sent properly. The problem is with the attachments. This maybe a MIME thing instea…

---

## [Trying to send an email with attachments](https://www.ruby-forum.com/t/trying-to-send-an-email-with-attachments/105628)

<div class="topic-metadata">

**Author:** [@grooveska](https://www.ruby-forum.com/u/grooveska)\
**Replies:** 0\
**Last updated:** [May 31, 2007, 9:20pm UTC](https://www.ruby-forum.com/t/trying-to-send-an-email-with-attachments/105628 "2007-05-31T21:20:59Z")

</div>

I am working on a script that will send an email with a .csv file attachment. I can get everything set correctly, and the email gets sent properly. The problem is with the attachments. This maybe a MIME thing instea…

---

## ["break" from a block and a proc object used in block positio](https://www.ruby-forum.com/t/break-from-a-block-and-a-proc-object-used-in-block-positio/105621)

<div class="topic-metadata">

**Author:** [@wonado](https://www.ruby-forum.com/u/wonado)\
**Replies:** 0\
**Last updated:** [May 31, 2007, 8:05pm UTC](https://www.ruby-forum.com/t/break-from-a-block-and-a-proc-object-used-in-block-positio/105621 "2007-05-31T20:05:53Z")

</div>

Hi! In german ruby-forum we had a question which ends up in unclear situations. The following code: ----- Code ----- def useblk1 puts “block (useblk1) returns ‘#{yield}’” 99 end puts “useblk1 returns ‘#{useblk1 …

---

## [Error while opening SSH](https://www.ruby-forum.com/t/error-while-opening-ssh/105620)

<div class="topic-metadata">

**Author:** [@MMMMMM](https://www.ruby-forum.com/u/MMMMMM)\
**Replies:** 0\
**Last updated:** [May 31, 2007, 8:01pm UTC](https://www.ruby-forum.com/t/error-while-opening-ssh/105620 "2007-05-31T20:01:40Z")

</div>

I am new to ruby. I was planning to automate some deployment processes and ruby scripts seem to provide an excellent medium to achieve the same. I am trying to start an SSH session and I get following error shown belo…

---

## [Getting Response from HTTPS POST](https://www.ruby-forum.com/t/getting-response-from-https-post/105617)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 0\
**Last updated:** [May 31, 2007, 7:30pm UTC](https://www.ruby-forum.com/t/getting-response-from-https-post/105617 "2007-05-31T19:30:49Z")

</div>

Hello, I am writing a crawler to parse webpages. One site that I am crawling requires me to log in, so I use an HTTPS POST to log in. However, once I send the POST I can’t get anywhere because I have to have a valid …

---

## [Callcc and Enumerable#each\_with\_index](https://www.ruby-forum.com/t/callcc-and-enumerable-each-with-index/105501)

<div class="topic-metadata">

**Author:** [@sheepman](https://www.ruby-forum.com/u/sheepman)\
**Replies:** 1\
**Last updated:** [May 31, 2007, 7:08pm UTC](https://www.ruby-forum.com/t/callcc-and-enumerable-each-with-index/105501 "2007-05-31T19:08:46Z")

</div>

e$B$3$s$P$s$O!"e(Bsheepman e$B$G$9!#e(B callcc e$B$He(B Enumerable#each\_with\_index e$B$r$$$C$7$g$K;H$&$He(B index e$B$,$\*$+$7$/$J$j$^$9!#e(B $ cat t.rb vv = 0 \[1, 2, 3\].each\_with\_index{|i, idx| callcc {|k| $k = k} …

---

## [Number formatting](https://www.ruby-forum.com/t/number-formatting/105609)

<div class="topic-metadata">

**Author:** [@cory](https://www.ruby-forum.com/u/cory)\
**Replies:** 3\
**Last updated:** [May 31, 2007, 6:14pm UTC](https://www.ruby-forum.com/t/number-formatting/105609 "2007-05-31T18:14:39Z")

</div>

folks - can’t quite figure this one out… foo = 5 bar = 10 basically - when i go to print out the numbers - i want to format ‘foo’ with a leding zero so that it reads ‘05’ and is aesthetically pleasing when compared …

---

## [Select(\[\]) method](https://www.ruby-forum.com/t/select-method/105562)

<div class="topic-metadata">

**Author:** [@Ari\_B](https://www.ruby-forum.com/u/Ari_B)\
**Replies:** 6\
**Last updated:** [May 31, 2007, 4:37pm UTC](https://www.ruby-forum.com/t/select-method/105562 "2007-05-31T16:37:26Z")

</div>

Hey all I cam across a new method: select(\[\], \[\], \[\], \[\]) where the objects in the select parentheses are arrays. But what does this exactly do? I could not find ANY documentation on it. The original code is: ready…

---

## [Trouble with system() on SunOS](https://www.ruby-forum.com/t/trouble-with-system-on-sunos/104301)

<div class="topic-metadata">

**Author:** [@galevsky](https://www.ruby-forum.com/u/galevsky)\
**Replies:** 3\
**Last updated:** [May 31, 2007, 4:36pm UTC](https://www.ruby-forum.com/t/trouble-with-system-on-sunos/104301 "2007-05-31T16:36:25Z")

</div>

Hi all, I am facing trouble with a system call on one of my tool: XmlChecker The script – test.rb system “echo ‘Here is the tool’” system “which XmlChecker” system “echo ‘$PATH def’” system “echo $PATH” system …

---

## [RubyForge offline](https://www.ruby-forum.com/t/rubyforge-offline/105596)

<div class="topic-metadata">

**Author:** [@tbcox23](https://www.ruby-forum.com/u/tbcox23)\
**Replies:** 1\
**Last updated:** [May 31, 2007, 4:33pm UTC](https://www.ruby-forum.com/t/rubyforge-offline/105596 "2007-05-31T16:33:25Z")

</div>

Hello all - RubyForge is offline; we’re investigating now. Yours, Tom

---

## [Looking for a pure Ruby uniq ID generator](https://www.ruby-forum.com/t/looking-for-a-pure-ruby-uniq-id-generator/105582)

<div class="topic-metadata">

**Author:** [@Zouplaz](https://www.ruby-forum.com/u/Zouplaz)\
**Replies:** 3\
**Last updated:** [May 31, 2007, 3:58pm UTC](https://www.ruby-forum.com/t/looking-for-a-pure-ruby-uniq-id-generator/105582 "2007-05-31T15:58:21Z")

</div>

Hello, I’m looking for a pure Ruby uniq non predictable ID generator In fact, quite the same as the uniq \*nix/cygwin command but fully writen with Ruby… Thanks

---

## [Does this code spawn lots of objects?](https://www.ruby-forum.com/t/does-this-code-spawn-lots-of-objects/105587)

<div class="topic-metadata">

**Author:** [@benemson](https://www.ruby-forum.com/u/benemson)\
**Replies:** 4\
**Last updated:** [May 31, 2007, 3:43pm UTC](https://www.ruby-forum.com/t/does-this-code-spawn-lots-of-objects/105587 "2007-05-31T15:43:20Z")

</div>

I have the following code:- dbh = DBI.connect(’’, '’, ‘’) smtp = Net::SMTP.start(’’) sql = open( “gw.sql”, “r” ).read sth = dbh.execute( sql ) sth.fetch\_hash do |row| mail = MailFactory.new() mail.to …

---

## [Fractals (#125)](https://www.ruby-forum.com/t/fractals-125/105593)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [May 31, 2007, 3:06pm UTC](https://www.ruby-forum.com/t/fractals-125/105593 "2007-05-31T15:06:12Z")

</div>

I lied to Morton G… I told him I thought a turtle graphics solution would be a unique approach not many people would try. Boy was I wrong! That turns out to be the easiest way to attack this problem and the solver…

---

## [\#respond\_to? not working for dynamically generated methods](https://www.ruby-forum.com/t/respond-to-not-working-for-dynamically-generated-methods/105472)

<div class="topic-metadata">

**Author:** [@maurice-gladwell](https://www.ruby-forum.com/u/maurice-gladwell)\
**Replies:** 36\
**Last updated:** [May 31, 2007, 2:56pm UTC](https://www.ruby-forum.com/t/respond-to-not-working-for-dynamically-generated-methods/105472 "2007-05-31T14:56:11Z")

</div>

It seems Object#respond\_to doesn’t work for dynamically generated methods: SomeRailsModel.respond\_to? ‘find\_by\_name’ #=\> false Is there some way to really check if an object will respond to a message, even if it wil…

---

## [How can access to AUTH\_USER?](https://www.ruby-forum.com/t/how-can-access-to-auth-user/105512)

<div class="topic-metadata">

**Author:** [@music](https://www.ruby-forum.com/u/music)\
**Replies:** 4\
**Last updated:** [May 31, 2007, 2:33pm UTC](https://www.ruby-forum.com/t/how-can-access-to-auth-user/105512 "2007-05-31T14:33:09Z")

</div>

With php I can access to AUTH\_USER and REMOTE\_ADDR to know the authenticated user and the ip from which he come. With ruby there is available REMOTE\_ADDR but not AUTH\_USER. How can I access to the authenticated users? …

---

## [REXML documentation offline?](https://www.ruby-forum.com/t/rexml-documentation-offline/105580)

<div class="topic-metadata">

**Author:** [@regularfry](https://www.ruby-forum.com/u/regularfry)\
**Replies:** 3\
**Last updated:** [May 31, 2007, 12:43pm UTC](https://www.ruby-forum.com/t/rexml-documentation-offline/105580 "2007-05-31T12:43:53Z")

</div>

Can anyone get through to http://www.germane-software.com/software/rexml/ ? I’m getting timeouts here, but it might just be my connection…

---

## [Mobile (Cellular) programming libraries?](https://www.ruby-forum.com/t/mobile-cellular-programming-libraries/105438)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [May 31, 2007, 12:05pm UTC](https://www.ruby-forum.com/t/mobile-cellular-programming-libraries/105438 "2007-05-31T12:05:50Z")

</div>

Hi All, Is anyone currently working on anything to implement WAP Push, SMPP, etc. as a set of Ruby libraries? Thanks! Chuck

---

## [Does this benchmark make sense?](https://www.ruby-forum.com/t/does-this-benchmark-make-sense/105551)

<div class="topic-metadata">

**Author:** [@clipper](https://www.ruby-forum.com/u/clipper)\
**Replies:** 3\
**Last updated:** [May 31, 2007, 9:24am UTC](https://www.ruby-forum.com/t/does-this-benchmark-make-sense/105551 "2007-05-31T09:24:27Z")

</div>

Hello, I was playing around with some Ruby features and benchmarked the following, showing that making a class call using “self.method” is faster than doing the same using “Classname.method”. Doesn’t make much sense…

---

## [ANN: Tftpplus 0.4](https://www.ruby-forum.com/t/ann-tftpplus-0-4/105572)

<div class="topic-metadata">

**Author:** [@Michael\_PSSoulier](https://www.ruby-forum.com/u/Michael_PSSoulier)\
**Replies:** 0\
**Last updated:** [May 31, 2007, 8:59am UTC](https://www.ruby-forum.com/t/ann-tftpplus-0-4/105572 "2007-05-31T08:59:22Z")

</div>

About Tftpplus: A new tftp library for clients and servers that supports RFCs 1350, 2347 and 2348 (ie. variable block sizes). Release Notes: About version 0.4: Fixed a download problem on windows. About version 0.3: …

---

## [Licence information](https://www.ruby-forum.com/t/licence-information/105556)

<div class="topic-metadata">

**Author:** [@rramaiah](https://www.ruby-forum.com/u/rramaiah)\
**Replies:** 2\
**Last updated:** [May 31, 2007, 6:17am UTC](https://www.ruby-forum.com/t/licence-information/105556 "2007-05-31T06:17:53Z")

</div>

Can you help me with a question that I cannot seem to find an answer toâ€¦. If you go to the Ruby site, you have the license agreement (http://www.ruby-lang.org/en/LICENSE.txt). Note the following, first paragraph. R…

---

## [Corruption when modifying array element](https://www.ruby-forum.com/t/corruption-when-modifying-array-element/105561)

<div class="topic-metadata">

**Author:** [@alake](https://www.ruby-forum.com/u/alake)\
**Replies:** 1\
**Last updated:** [May 31, 2007, 5:36am UTC](https://www.ruby-forum.com/t/corruption-when-modifying-array-element/105561 "2007-05-31T05:36:11Z")

</div>

When modifying an element in a row, the result becomes corrupted when I try to read it back. new\_row is being modified correctly. It is then being appended to new\_rows (plural). But when I read new\_rows back, each …

---

## [ANN: Tftpplus 0.4](https://www.ruby-forum.com/t/ann-tftpplus-0-4/105564)

<div class="topic-metadata">

**Author:** [@msoulier](https://www.ruby-forum.com/u/msoulier)\
**Replies:** 0\
**Last updated:** [May 31, 2007, 4:46am UTC](https://www.ruby-forum.com/t/ann-tftpplus-0-4/105564 "2007-05-31T04:46:06Z")

</div>

About Tftpplus: A new tftp library for clients and servers that supports RFCs 1350, 2347 and 2348 (ie. variable block sizes). Release Notes: About version 0.4: Fixed a download problem on windows. About version 0.3: …

---

## [\`concat': can't modify frozen string in benchmark.rb](https://www.ruby-forum.com/t/concat-cant-modify-frozen-string-in-benchmark-rb/105558)

<div class="topic-metadata">

**Author:** [@PeSSSSaS\_Botp](https://www.ruby-forum.com/u/PeSSSSaS_Botp)\
**Replies:** 2\
**Last updated:** [May 31, 2007, 4:39am UTC](https://www.ruby-forum.com/t/concat-cant-modify-frozen-string-in-benchmark-rb/105558 "2007-05-31T04:39:06Z")

</div>

Hi All, C:\\family\\ruby\>cat test.rb def f(command\_here) #{command\_here} end a = { “Local copy”=\>“copy test.txt test.txt2” } require ‘benchmark’ Benchmark.bmbm do |x| a.each do |k,v| x.report(k) { f v } end …

---

## [Re: Fractals (#125)](https://www.ruby-forum.com/t/re-fractals-125/105559)

<div class="topic-metadata">

**Author:** [@davidtl](https://www.ruby-forum.com/u/davidtl)\
**Replies:** 0\
**Last updated:** [May 31, 2007, 4:15am UTC](https://www.ruby-forum.com/t/re-fractals-125/105559 "2007-05-31T04:15:04Z")

</div>

\#---------------------------------------------------------------------# Program : Fractals (Ruby Q. #125) Author : David T. Date : 2007-05-30 Blog : http://davidtran.doublegifts.com/blog/?p=48 Refe…

---

## [Irc](https://www.ruby-forum.com/t/irc/105553)

<div class="topic-metadata">

**Author:** [@Ari\_B](https://www.ruby-forum.com/u/Ari_B)\
**Replies:** 0\
**Last updated:** [May 31, 2007, 2:14am UTC](https://www.ruby-forum.com/t/irc/105553 "2007-05-31T02:14:52Z")

</div>

I did a ri IRC just now, and it came up with a class document for establishing IRC connections. Is there any better documentations for that? And, better yet, does anyone know of any documentation for Ruby-IRC? Any ot…

---

## [Net::HTTP Logging in / Persistent sessions problem](https://www.ruby-forum.com/t/net-http-logging-in-persistent-sessions-problem/105451)

<div class="topic-metadata">

**Author:** [@yeago](https://www.ruby-forum.com/u/yeago)\
**Replies:** 4\
**Last updated:** [May 31, 2007, 1:12am UTC](https://www.ruby-forum.com/t/net-http-logging-in-persistent-sessions-problem/105451 "2007-05-31T01:12:49Z")

</div>

I am able to login to a website at authenticate.domain.com but when I attempt to visit panel.domain.com it appears the http session has been lost. Code: Net::HTTP.start(‘authenticate.domain.com’,80){|http| log = htt…

---

## [Symbol lookup error](https://www.ruby-forum.com/t/symbol-lookup-error/105536)

<div class="topic-metadata">

**Author:** [@Audun\_Skaugen](https://www.ruby-forum.com/u/Audun_Skaugen)\
**Replies:** 1\
**Last updated:** [May 30, 2007, 11:15pm UTC](https://www.ruby-forum.com/t/symbol-lookup-error/105536 "2007-05-30T23:15:39Z")

</div>

Hi, I have recently become interested in Ruby as an alternative to Python. I was amazed at how easy to use Ruby’s C API seems to be, so I decided to try it out. I went ahead and started wrapping one of the most fun l…

---

## [Problem with using ruby](https://www.ruby-forum.com/t/problem-with-using-ruby/105242)

<div class="topic-metadata">

**Author:** [@Ade](https://www.ruby-forum.com/u/Ade)\
**Replies:** 5\
**Last updated:** [May 30, 2007, 10:41pm UTC](https://www.ruby-forum.com/t/problem-with-using-ruby/105242 "2007-05-30T22:41:33Z")

</div>

This is somewhat silly, i downloaded the 1.8.6-25 installer for windows and installed it. I went to the command prompt and typed ruby -v, and i got this message saying ruby isnt a batch command recognized by windows. …

---

## [Inet\_addr inet\_ntoa](https://www.ruby-forum.com/t/inet-addr-inet-ntoa/105530)

<div class="topic-metadata">

**Author:** [@rickf](https://www.ruby-forum.com/u/rickf)\
**Replies:** 2\
**Last updated:** [May 30, 2007, 10:19pm UTC](https://www.ruby-forum.com/t/inet-addr-inet-ntoa/105530 "2007-05-30T22:19:26Z")

</div>

Hi All, I tried looking up answers for this with little success…any help is appreciated, bear with my newness to Ruby. The application I am working on can store ip addresses in a DB. They are accessed by different pl…

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

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