# Ruby

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

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

---

## [Registration for the Ruby Hoedown is now open!](https://www.ruby-forum.com/t/registration-for-the-ruby-hoedown-is-now-open/106619)

<div class="topic-metadata">

**Author:** [@Jeremy\_McAnally](https://www.ruby-forum.com/u/Jeremy_McAnally)\
**Replies:** 0\
**Last updated:** [June 12, 2007, 3:14pm UTC](https://www.ruby-forum.com/t/registration-for-the-ruby-hoedown-is-now-open/106619 "2007-06-12T15:14:09Z")

</div>

We opened up registration for The Ruby Hoedown 2007 yesterday (to give our announce list subscribers first dibs ;)), so fire up your web browser and hit http://www.rubyhoedown.com/. There you can check out the amazin…

---

## [Sending mails](https://www.ruby-forum.com/t/sending-mails/106611)

<div class="topic-metadata">

**Author:** [@nilez](https://www.ruby-forum.com/u/nilez)\
**Replies:** 0\
**Last updated:** [June 12, 2007, 12:24pm UTC](https://www.ruby-forum.com/t/sending-mails/106611 "2007-06-12T12:24:29Z")

</div>

hi everyone, Can anyone give me the step-by-step procedure for sending mails in rails using SMTP? Regards, Nilez

---

## [Net::FTP : How to check whether chdir succeeded?](https://www.ruby-forum.com/t/net-ftp-how-to-check-whether-chdir-succeeded/106092)

<div class="topic-metadata">

**Author:** [@ronaldfischer](https://www.ruby-forum.com/u/ronaldfischer)\
**Replies:** 4\
**Last updated:** [June 12, 2007, 11:13am UTC](https://www.ruby-forum.com/t/net-ftp-how-to-check-whether-chdir-succeeded/106092 "2007-06-12T11:13:15Z")

</div>

Does anyone know a reliable way to detect, whether Net::FTP#chdir was successful? Even if the directory does not exist, no exception is thrown. Ronald

---

## [Newb Wants to Better His File, Dir code](https://www.ruby-forum.com/t/newb-wants-to-better-his-file-dir-code/106367)

<div class="topic-metadata">

**Author:** [@R.B.Love](https://www.ruby-forum.com/u/R.B.Love)\
**Replies:** 10\
**Last updated:** [June 12, 2007, 10:57am UTC](https://www.ruby-forum.com/t/newb-wants-to-better-his-file-dir-code/106367 "2007-06-12T10:57:13Z")

</div>

I’ve got code working to do what I want but I’m hoping there is a better way. Mine seems clumsy. My goal is to search over all files, identify all that are directories and then do something to each directory. I don…

---

## [Rabal 0.0.1 Released](https://www.ruby-forum.com/t/rabal-0-0-1-released/106599)

<div class="topic-metadata">

**Author:** [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Replies:** 0\
**Last updated:** [June 12, 2007, 10:37am UTC](https://www.ruby-forum.com/t/rabal-0-0-1-released/106599 "2007-06-12T10:37:10Z")

</div>

rabal version 0.0.1 has been released. http://copiousfreetime.rubyforge.org/rabal/ Rabal is the Ruby Architecture for Building Applications and Libraries. Taking ideas from Haskell’s Cabal, Hoe and Rubyforge projects,…

---

## [Unit testing rails model validation? - why bother? what's ra](https://www.ruby-forum.com/t/unit-testing-rails-model-validation-why-bother-whats-ra/106488)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 3\
**Last updated:** [June 12, 2007, 10:27am UTC](https://www.ruby-forum.com/t/unit-testing-rails-model-validation-why-bother-whats-ra/106488 "2007-06-12T10:27:06Z")

</div>

Hi all, Is there any need to write unit test cases for model validation when such validation is implemented by a single rails validate\_\* line in the model? e.g. “validates\_presence\_of :email”. Conservatively I woul…

---

## [RDoc markup](https://www.ruby-forum.com/t/rdoc-markup/106454)

<div class="topic-metadata">

**Author:** [@dracos](https://www.ruby-forum.com/u/dracos)\
**Replies:** 2\
**Last updated:** [June 12, 2007, 9:49am UTC](https://www.ruby-forum.com/t/rdoc-markup/106454 "2007-06-12T09:49:55Z")

</div>

Can someone please give me an outline, or a link to an outline, of RDoc markup for Ruby Source? Thanks

---

## [How to get properties of a JSP page using IRB](https://www.ruby-forum.com/t/how-to-get-properties-of-a-jsp-page-using-irb/106590)

<div class="topic-metadata">

**Author:** [@sourabh](https://www.ruby-forum.com/u/sourabh)\
**Replies:** 1\
**Last updated:** [June 12, 2007, 9:32am UTC](https://www.ruby-forum.com/t/how-to-get-properties-of-a-jsp-page-using-irb/106590 "2007-06-12T09:32:54Z")

</div>

hi i am using Watir(web application testing in ruby) to automate a JSP page. i successfully automated a html page but when i am following same process to automate jsp page, the watir commands are not able to recognize…

---

## [Ruby way to update a file in place](https://www.ruby-forum.com/t/ruby-way-to-update-a-file-in-place/106554)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 11\
**Last updated:** [June 12, 2007, 8:15am UTC](https://www.ruby-forum.com/t/ruby-way-to-update-a-file-in-place/106554 "2007-06-12T08:15:41Z")

</div>

Hi all, I just wonder what is the Ruby way to update a file in place. Do I need to open a temporary/new file for writing and then rename the temporary file? Thanks, Li

---

## [Possible to unset at\_exit?](https://www.ruby-forum.com/t/possible-to-unset-at-exit/106575)

<div class="topic-metadata">

**Author:** [@Todd\_ASJacobs](https://www.ruby-forum.com/u/Todd_ASJacobs)\
**Replies:** 1\
**Last updated:** [June 12, 2007, 7:26am UTC](https://www.ruby-forum.com/t/possible-to-unset-at-exit/106575 "2007-06-12T07:26:36Z")

</div>

Is it possible to unset an at\_exit proc? Currently, I’m calling exit! in order to bypass defined exit handlers, but it seems like there should be a better way, such as unsetting specific procs that I may not want to r…

---

## [Restricting Objects in Ruby Shell](https://www.ruby-forum.com/t/restricting-objects-in-ruby-shell/106580)

<div class="topic-metadata">

**Author:** [@SunRaySon](https://www.ruby-forum.com/u/SunRaySon)\
**Replies:** 1\
**Last updated:** [June 12, 2007, 7:24am UTC](https://www.ruby-forum.com/t/restricting-objects-in-ruby-shell/106580 "2007-06-12T07:24:36Z")

</div>

Is there a way in which the ruby IRB interface can be restricted. I would like only objects defined by my application can be accessed and only some of the ruby in-built objects can be made available to the user. For…

---

## [Lone Star Rubyconf 2007 - Registration Now Open!](https://www.ruby-forum.com/t/lone-star-rubyconf-2007-registration-now-open/106576)

<div class="topic-metadata">

**Author:** [@sauy7](https://www.ruby-forum.com/u/sauy7)\
**Replies:** 0\
**Last updated:** [June 12, 2007, 5:11am UTC](https://www.ruby-forum.com/t/lone-star-rubyconf-2007-registration-now-open/106576 "2007-06-12T05:11:25Z")

</div>

We are happy to announce that registration for Lone Star Rubyconf 2007 is Now Open. We have an exciting line-up of speakers, that will be posted this week, along with notable keynotes. Don’t miss out on this exciting…

---

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

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 0\
**Last updated:** [June 12, 2007, 4:52am UTC](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/220710 "2007-06-12T04:52:24Z")

</div>

Begin forwarded message:

---

## [I want to turn off backslashing of quotes and such from the](https://www.ruby-forum.com/t/i-want-to-turn-off-backslashing-of-quotes-and-such-from-the/106481)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 4\
**Last updated:** [June 12, 2007, 4:42am UTC](https://www.ruby-forum.com/t/i-want-to-turn-off-backslashing-of-quotes-and-such-from-the/106481 "2007-06-12T04:42:24Z")

</div>

I do something like: result=cat mess.html p result and all my quotes in my html file are suddenly backslashed. Is there any way to turn that off? xc

---

## [Possible bug in oniguruma, not 64-bit clean?](https://www.ruby-forum.com/t/possible-bug-in-oniguruma-not-64-bit-clean/106533)

<div class="topic-metadata">

**Author:** [@bch36](https://www.ruby-forum.com/u/bch36)\
**Replies:** 5\
**Last updated:** [June 12, 2007, 3:11am UTC](https://www.ruby-forum.com/t/possible-bug-in-oniguruma-not-64-bit-clean/106533 "2007-06-12T03:11:09Z")

</div>

I have a ruby script that uses some oniguruma features. It works on this setup: FreeBSD 32-bit intel ruby 1.8.5 (2006-08-25) \[i386-freebsd4\] ruby compiled from the FreeBSD port, with oniguruma support It does not w…

---

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

<div class="topic-metadata">

**Author:** [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Replies:** 0\
**Last updated:** [June 12, 2007, 2:15am UTC](https://www.ruby-forum.com/t/no-subject/106571 "2007-06-12T02:15:06Z")

</div>

http://www.ngdc.noaa.gov/eog/maps/cgi-bin/public/ms/poster/viewer much ruby under the hood. enjoy. -a

---

## [Synchronized attr\_accessor](https://www.ruby-forum.com/t/synchronized-attr-accessor/106350)

<div class="topic-metadata">

**Author:** [@Nasir\_K](https://www.ruby-forum.com/u/Nasir_K)\
**Replies:** 22\
**Last updated:** [June 12, 2007, 2:07am UTC](https://www.ruby-forum.com/t/synchronized-attr-accessor/106350 "2007-06-12T02:07:05Z")

</div>

I have a fairly repetitive use case of having to define attributes and have them lock protected. I was thinking of defining a attr\_accessor kind of directive but one that creates a lock protected attribute - class Mod…

---

## [Using assert\_in\_delta for floats with extended notation](https://www.ruby-forum.com/t/using-assert-in-delta-for-floats-with-extended-notation/106457)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 2\
**Last updated:** [June 12, 2007, 1:33am UTC](https://www.ruby-forum.com/t/using-assert-in-delta-for-floats-with-extended-notation/106457 "2007-06-12T01:33:02Z")

</div>

Hi all, For comparing floats I normally do something like this: assert\_in\_delta(‘100.324’, ‘100.32’, 0.01) However, for extended notation it breaks down: assert\_in\_delta(1.34341429278853e+15, 18446744073709551616.qu…

---

## [\[SOLUTION\] Mexican Blanket (#127)](https://www.ruby-forum.com/t/solution-mexican-blanket-127/106465)

<div class="topic-metadata">

**Author:** [@Justin\_E](https://www.ruby-forum.com/u/Justin_E)\
**Replies:** 2\
**Last updated:** [June 12, 2007, 12:35am UTC](https://www.ruby-forum.com/t/solution-mexican-blanket-127/106465 "2007-06-12T00:35:59Z")

</div>

Hello, Here is my solution to the quiz. Looking at the pattern for a moment, each line of the pattern is really just the previous line, shifted over one pixel. Thus to draw the pattern we can first calculate what all…

---

## [Relative/absolute url parsing](https://www.ruby-forum.com/t/relative-absolute-url-parsing/106472)

<div class="topic-metadata">

**Author:** [@dagnan](https://www.ruby-forum.com/u/dagnan)\
**Replies:** 5\
**Last updated:** [June 11, 2007, 11:42pm UTC](https://www.ruby-forum.com/t/relative-absolute-url-parsing/106472 "2007-06-11T23:42:54Z")

</div>

Hi! I have to collect urls from html files, I to transform relative urls to absolute, I have to handle for example url beginning with ‘…/’ and ‘./’, which is kind of ennoying :smiley: (my head hurts because of the de…

---

## [Constants and metaclasses](https://www.ruby-forum.com/t/constants-and-metaclasses/106543)

<div class="topic-metadata">

**Author:** [@andreas\_l](https://www.ruby-forum.com/u/andreas_l)\
**Replies:** 5\
**Last updated:** [June 11, 2007, 11:02pm UTC](https://www.ruby-forum.com/t/constants-and-metaclasses/106543 "2007-06-11T23:02:49Z")

</div>

Is there a way to define a constant in a metaclass and then have it used in methods defined in the original class? An example: class Foo def foo p BAR end end f = Foo.new class \<\<f BAR = “Hello” def bar p BAR …

---

## [Doing rake-like stuff with mkmf?](https://www.ruby-forum.com/t/doing-rake-like-stuff-with-mkmf/106387)

<div class="topic-metadata">

**Author:** [@Wincent\_C](https://www.ruby-forum.com/u/Wincent_C)\
**Replies:** 2\
**Last updated:** [June 11, 2007, 10:15pm UTC](https://www.ruby-forum.com/t/doing-rake-like-stuff-with-mkmf/106387 "2007-06-11T22:15:45Z")

</div>

Following the pattern I’ve seen in widespread use, I use rake in my Ruby projects for most high-level tasks (running specs, building gems etc) and mkmf to make C extension makefiles. mkmf works great for the simple ca…

---

## [Labrador v0.0.1 or broken @ key](https://www.ruby-forum.com/t/labrador-v0-0-1-or-broken-key/106552)

<div class="topic-metadata">

**Author:** [@flatekmonkey](https://www.ruby-forum.com/u/flatekmonkey)\
**Replies:** 0\
**Last updated:** [June 11, 2007, 9:36pm UTC](https://www.ruby-forum.com/t/labrador-v0-0-1-or-broken-key/106552 "2007-06-11T21:36:26Z")

</div>

Hi list I eventually decided to submit some code to Rubyforge, just waiting for the Rubyforge decision… In the meantime I wanted to share some of the code to be released. It seems that Robert K. broke his “@” key :wi…

---

## [Newbie question about Ri](https://www.ruby-forum.com/t/newbie-question-about-ri/106311)

<div class="topic-metadata">

**Author:** [@grehom](https://www.ruby-forum.com/u/grehom)\
**Replies:** 12\
**Last updated:** [June 11, 2007, 8:43pm UTC](https://www.ruby-forum.com/t/newbie-question-about-ri/106311 "2007-06-11T20:43:12Z")

</div>

I just installed the latest Windows version from Activestate (having completely removed earlier version) ruby186-25.exe and that is working fine: C:\\ruby\\bin\>ruby -v ruby 1.8.6 (2007-03-13 patchlevel 0) \[i386-mswin32…

---

## [Long string assignment](https://www.ruby-forum.com/t/long-string-assignment/106522)

<div class="topic-metadata">

**Author:** [@w\_wg](https://www.ruby-forum.com/u/w_wg)\
**Replies:** 7\
**Last updated:** [June 11, 2007, 8:42pm UTC](https://www.ruby-forum.com/t/long-string-assignment/106522 "2007-06-11T20:42:12Z")

</div>

Hi, In php, I can use the following code : $str = \<\<\<aa hello, how are you? aa ; But how can I do this in ruby ? Thank you.

---

## [Why gsub! doesn't work in my script](https://www.ruby-forum.com/t/why-gsub-doesnt-work-in-my-script/106518)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 9\
**Last updated:** [June 11, 2007, 7:49pm UTC](https://www.ruby-forum.com/t/why-gsub-doesnt-work-in-my-script/106518 "2007-06-11T19:49:11Z")

</div>

Hi all, I want to search one pattern in a file line by line and replace it with new pattern one. But it doesn’t work. I cannot change the old pattern into the new one using gsub! Is there any problem with my script? …

---

## [Custom Mutex methods undefined by fastthread](https://www.ruby-forum.com/t/custom-mutex-methods-undefined-by-fastthread/106521)

<div class="topic-metadata">

**Author:** [@regularfry](https://www.ruby-forum.com/u/regularfry)\
**Replies:** 11\
**Last updated:** [June 11, 2007, 7:23pm UTC](https://www.ruby-forum.com/t/custom-mutex-methods-undefined-by-fastthread/106521 "2007-06-11T19:23:57Z")

</div>

At the risk of asking an FAQ, I’ve run into the following problem: irb(main):001:0\> require ‘thread’ =\> true irb(main):002:0\> class Mutex; attr\_accessor :owner; end =\> nil irb(main):003:0\> require ‘rubygems’ =\> tru…

---

## [Fwd: Unroller](https://www.ruby-forum.com/t/fwd-unroller/106517)

<div class="topic-metadata">

**Author:** [@fbrubacher](https://www.ruby-forum.com/u/fbrubacher)\
**Replies:** 2\
**Last updated:** [June 11, 2007, 6:45pm UTC](https://www.ruby-forum.com/t/fwd-unroller/106517 "2007-06-11T18:45:52Z")

</div>

Hi! i was checking out the gem Unroller http://unroller.rubyforge.org/ that seems pretty promising but I think I couldn’t make it work right, I wrote a simple helloworld program : require ‘rubygems’ require ‘unrol…

---

## [Monday, June 11, Phoenix Ruby User Group Meeting](https://www.ruby-forum.com/t/monday-june-11-phoenix-ruby-user-group-meeting/106527)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [June 11, 2007, 5:50pm UTC](https://www.ruby-forum.com/t/monday-june-11-phoenix-ruby-user-group-meeting/106527 "2007-06-11T17:50:43Z")

</div>

What: The June meeting of the Phoenix Ruby U. Group When: Monday June 11, 2007, at 6:30pm Where: Offices of MWA Intelligence See http://www.rubyaz.org/groups/prug/ for details, including maps and directions Topic: …

---

## [Problem with getting info from several websites](https://www.ruby-forum.com/t/problem-with-getting-info-from-several-websites/106221)

<div class="topic-metadata">

**Author:** [@tomtoday](https://www.ruby-forum.com/u/tomtoday)\
**Replies:** 13\
**Last updated:** [June 11, 2007, 5:42pm UTC](https://www.ruby-forum.com/t/problem-with-getting-info-from-several-websites/106221 "2007-06-11T17:42:43Z")

</div>

Hi there, The code below provides me the html for a specific id of the site: www.securityfocus.com What I’m trying to do is: Getting the info of the div id =“vulnerability” only, but for all the different id’s availa…

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

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