# Ruby

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

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

---

## [Performing $SAFE checks with test-unit](https://www.ruby-forum.com/t/performing-safe-checks-with-test-unit/107420)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 2\
**Last updated:** [June 21, 2007, 11:01pm UTC](https://www.ruby-forum.com/t/performing-safe-checks-with-test-unit/107420 "2007-06-21T23:01:45Z")

</div>

Hi all, Is there a way to perform $SAFE checks with test-unit? I tried this with Ruby 1.8.6: require ‘test/unit’ class TC\_Hash\_Replace \< Test::Unit::TestCase def setup $SAFE = 0 end def test\_replace\_in\_safe\_mode …

---

## [Modular classes and avoiding extension clashes](https://www.ruby-forum.com/t/modular-classes-and-avoiding-extension-clashes/107447)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 1\
**Last updated:** [June 21, 2007, 10:23pm UTC](https://www.ruby-forum.com/t/modular-classes-and-avoiding-extension-clashes/107447 "2007-06-21T22:23:38Z")

</div>

I refer back to: Ruby-talk: 240334 http://groups.google.com/group/ruby-talk-google/browse\_thread/thread/9dbe8cd0898227b5/409301042321f6fc?lnk=gst&q=open+class+module+trans&rnum=2&hl=en#409301042321f6fc I’ve thought of…

---

## [Ruby/Zoom, Yaz problem](https://www.ruby-forum.com/t/ruby-zoom-yaz-problem/107444)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [June 21, 2007, 10:11pm UTC](https://www.ruby-forum.com/t/ruby-zoom-yaz-problem/107444 "2007-06-21T22:11:36Z")

</div>

Ok, I have successfully built Yaz and Ruby/Zoom on Feisty Fawn and OS X/Tiger (Intel) in the recent past. I’ve tried to do the same thing on Tiger/PPC and am encountering the following problem when trying to \<require …

---

## [Undefined method 'a=' when initializing an object](https://www.ruby-forum.com/t/undefined-method-a-when-initializing-an-object/107430)

<div class="topic-metadata">

**Author:** [@bparanj](https://www.ruby-forum.com/u/bparanj)\
**Replies:** 5\
**Last updated:** [June 21, 2007, 9:31pm UTC](https://www.ruby-forum.com/t/undefined-method-a-when-initializing-an-object/107430 "2007-06-21T21:31:30Z")

</div>

I have an array of strings that contains the values for attributes of an object. I have another array that contains the list of attributes (strings) for an object. I am creating the class by: obj = class\_name.new wh…

---

## [Pickaxe ruby extension example](https://www.ruby-forum.com/t/pickaxe-ruby-extension-example/107439)

<div class="topic-metadata">

**Author:** [@ktheory](https://www.ruby-forum.com/u/ktheory)\
**Replies:** 0\
**Last updated:** [June 21, 2007, 9:25pm UTC](https://www.ruby-forum.com/t/pickaxe-ruby-extension-example/107439 "2007-06-21T21:25:58Z")

</div>

Strange, I had the extension working a while ago from the pickaxe book. Now when I run the extconf.rb and make I get some errors… any ideas? EX: #include "ruby.h" static int id\_push; static VALUE t\_init(VALUE self) { …

---

## [Two Problems From a Newbie](https://www.ruby-forum.com/t/two-problems-from-a-newbie/107393)

<div class="topic-metadata">

**Author:** [@danielj](https://www.ruby-forum.com/u/danielj)\
**Replies:** 6\
**Last updated:** [June 21, 2007, 8:48pm UTC](https://www.ruby-forum.com/t/two-problems-from-a-newbie/107393 "2007-06-21T20:48:26Z")

</div>

def mtdarry 10.times do |num| square = num \* num return num, square if num \> 5 end end num, square = mtdarry puts num puts square I can’t figure out why this outputs they way it does? I know it is simple but I …

---

## [How can I implement cd (change dir) command in Ruby?](https://www.ruby-forum.com/t/how-can-i-implement-cd-change-dir-command-in-ruby/107435)

<div class="topic-metadata">

**Author:** [@ssk](https://www.ruby-forum.com/u/ssk)\
**Replies:** 1\
**Last updated:** [June 21, 2007, 8:05pm UTC](https://www.ruby-forum.com/t/how-can-i-implement-cd-change-dir-command-in-ruby/107435 "2007-06-21T20:05:20Z")

</div>

Hi, This question is rather out of curiosity than practical. Let’s say I want to make a script which is equivalent to cd command in Linux. Is it possible? Usage: ~$ ruby mycd.rb /temp /temp$ \<- current di…

---

## [Sun Cobalt RaQ 550 Installation](https://www.ruby-forum.com/t/sun-cobalt-raq-550-installation/107434)

<div class="topic-metadata">

**Author:** [@Anthony\_Landa](https://www.ruby-forum.com/u/Anthony_Landa)\
**Replies:** 0\
**Last updated:** [June 21, 2007, 7:40pm UTC](https://www.ruby-forum.com/t/sun-cobalt-raq-550-installation/107434 "2007-06-21T19:40:33Z")

</div>

I tried to install Ruby per the instructions on http://wiki.rubyonrails.com/rails/pages/GettingStartedWithRails and http://wiki.rubyonrails.com/rails/pages/Ruby+and+Rails+on+Red+Hat+Linux+9 During the ‘make’, things …

---

## [REXML, XPath and Namespace](https://www.ruby-forum.com/t/rexml-xpath-and-namespace/107005)

<div class="topic-metadata">

**Author:** [@hinsen](https://www.ruby-forum.com/u/hinsen)\
**Replies:** 1\
**Last updated:** [June 21, 2007, 6:56pm UTC](https://www.ruby-forum.com/t/rexml-xpath-and-namespace/107005 "2007-06-21T18:56:10Z")

</div>

Hi. I want to parse an xml file using REXML::XPath. I can easily navigate through the xml-tree with methods like ‘XPath.match(xml, “child::\*”)’ and. But i can’t access nodes with the structure ‘prefix:name’. Even thi…

---

## [Code Critique: check if int or float](https://www.ruby-forum.com/t/code-critique-check-if-int-or-float/107375)

<div class="topic-metadata">

**Author:** [@ole](https://www.ruby-forum.com/u/ole)\
**Replies:** 8\
**Last updated:** [June 21, 2007, 6:26pm UTC](https://www.ruby-forum.com/t/code-critique-check-if-int-or-float/107375 "2007-06-21T18:26:58Z")

</div>

Hello again folks, I’m really starting to like this language. I’m working towards building a simple expression evaluator. I couldn’t seem to find any methods for testing whether a string contains an integer or float. …

---

## [RSS feed for this group?](https://www.ruby-forum.com/t/rss-feed-for-this-group/107414)

<div class="topic-metadata">

**Author:** [@mtnbiker](https://www.ruby-forum.com/u/mtnbiker)\
**Replies:** 1\
**Last updated:** [June 21, 2007, 5:14pm UTC](https://www.ruby-forum.com/t/rss-feed-for-this-group/107414 "2007-06-21T17:14:50Z")

</div>

Is there an RSS feed for the Ruby group as hosted on www.ruby-forum.com (http://www.ruby-forum.com/forum/4)? I know there is for the Google hosting, but I’d rather be directed here by my RSS reader. Thanks. If not ca…

---

## [Ruby MVC](https://www.ruby-forum.com/t/ruby-mvc/107281)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 13\
**Last updated:** [June 21, 2007, 5:04pm UTC](https://www.ruby-forum.com/t/ruby-mvc/107281 "2007-06-21T17:04:45Z")

</div>

Hi Everybody, I’m working on a data mining application, and MVC seems like the right approach. However, I’m having trouble finding a good MVC framework outside of Rails. I’m not particularly interested in running a …

---

## [Where to place class files?](https://www.ruby-forum.com/t/where-to-place-class-files/107366)

<div class="topic-metadata">

**Author:** [@shadowcipher](https://www.ruby-forum.com/u/shadowcipher)\
**Replies:** 2\
**Last updated:** [June 21, 2007, 4:29pm UTC](https://www.ruby-forum.com/t/where-to-place-class-files/107366 "2007-06-21T16:29:31Z")

</div>

I wrote my own class definition and placed it inside a file called mynewclass.rb. I then placed this file inside /usr/local/lib/ruby/1.8/mynewclass/. The mynewclass.rb file has require ‘rubygems’ require ‘uuidtools…

---

## [Unsubscribe](https://www.ruby-forum.com/t/unsubscribe/107380)

<div class="topic-metadata">

**Author:** [@chris\_neren](https://www.ruby-forum.com/u/chris_neren)\
**Replies:** 1\
**Last updated:** [June 21, 2007, 4:28pm UTC](https://www.ruby-forum.com/t/unsubscribe/107380 "2007-06-21T16:28:30Z")

</div>

thank you.

---

## [Verbal Arithmetic (#128)](https://www.ruby-forum.com/t/verbal-arithmetic-128/107410)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [June 21, 2007, 2:51pm UTC](https://www.ruby-forum.com/t/verbal-arithmetic-128/107410 "2007-06-21T14:51:14Z")

</div>

I’m always impressed by the creativity of the solutions, but I think this week stands out even more than usual. I literally spent hours going through the solutions and learned some really great tricks from them. I …

---

## [Help needed with my grid and code](https://www.ruby-forum.com/t/help-needed-with-my-grid-and-code/107409)

<div class="topic-metadata">

**Author:** [@tillaart36](https://www.ruby-forum.com/u/tillaart36)\
**Replies:** 1\
**Last updated:** [June 21, 2007, 2:34pm UTC](https://www.ruby-forum.com/t/help-needed-with-my-grid-and-code/107409 "2007-06-21T14:34:59Z")

</div>

Hey guys, Im in need of some help here…i have a lot of code (with help of a teacher) and now i need to figure out how this code works and i have to improve it. The code works out a grid of 14 x 14 cells…then it place…

---

## [Problems executing example code from xruby](https://www.ruby-forum.com/t/problems-executing-example-code-from-xruby/107378)

<div class="topic-metadata">

**Author:** [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Replies:** 1\
**Last updated:** [June 21, 2007, 2:01pm UTC](https://www.ruby-forum.com/t/problems-executing-example-code-from-xruby/107378 "2007-06-21T14:01:06Z")

</div>

Dear all, I am experiencing problems while executing the example script from xruby, which should generate Java \*class code from ruby \*rb scripts. So the error I am getting requires some Java, and xruby rather than r…

---

## [Ruby-ldap-0.9.7-1.i386 on windows](https://www.ruby-forum.com/t/ruby-ldap-0-9-7-1-i386-on-windows/107400)

<div class="topic-metadata">

**Author:** [@marco](https://www.ruby-forum.com/u/marco)\
**Replies:** 3\
**Last updated:** [June 21, 2007, 12:10pm UTC](https://www.ruby-forum.com/t/ruby-ldap-0-9-7-1-i386-on-windows/107400 "2007-06-21T12:10:54Z")

</div>

Hi, I’m new to ruby and i want to use the package ruby-ldap-0.9.7-1.i386 but I have some problem to find on line what is the correct way to install and use? Can you help me

---

## [Verbal Arithmetic (#128)](https://www.ruby-forum.com/t/verbal-arithmetic-128/106936)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 28\
**Last updated:** [June 21, 2007, 7:55am UTC](https://www.ruby-forum.com/t/verbal-arithmetic-128/106936 "2007-06-21T07:55:22Z")

</div>

The three rules of Ruby Q.: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on this message. Support Ruby Q. by submitting ideas as often as you can: …

---

## [Re: Log file doesn't show message](https://www.ruby-forum.com/t/re-log-file-doesnt-show-message/107394)

<div class="topic-metadata">

**Author:** [@brianspaid](https://www.ruby-forum.com/u/brianspaid)\
**Replies:** 0\
**Last updated:** [June 21, 2007, 7:30am UTC](https://www.ruby-forum.com/t/re-log-file-doesnt-show-message/107394 "2007-06-21T07:30:21Z")

</div>

unsubscribe rewrote the src, hope this helps: URL\_MASK = ‘http://www.securityfocus.com/bid/%i’.freeze root\_logger.error error.inspect end files have been created successfully or that provides me an error message …

---

## [Listing of hosts in a LAN or domain name group?](https://www.ruby-forum.com/t/listing-of-hosts-in-a-lan-or-domain-name-group/107390)

<div class="topic-metadata">

**Author:** [@gga](https://www.ruby-forum.com/u/gga)\
**Replies:** 0\
**Last updated:** [June 21, 2007, 6:57am UTC](https://www.ruby-forum.com/t/listing-of-hosts-in-a-lan-or-domain-name-group/107390 "2007-06-21T06:57:19Z")

</div>

What’s the preferred ruby way of listing hosts in a LAN or within a domain group? In particular, I am interested in 4 things: Listing all connected hosts in a LAN / domain group (assuming there could be some hosts …

---

## [Rb\_get\_interned](https://www.ruby-forum.com/t/rb-get-interned/107293)

<div class="topic-metadata">

**Author:** [@nobu](https://www.ruby-forum.com/u/nobu)\
**Replies:** 4\
**Last updated:** [June 21, 2007, 3:26am UTC](https://www.ruby-forum.com/t/rb-get-interned/107293 "2007-06-21T03:26:06Z")

</div>

e$B$J$+$@$G$9!#e(B e$B0JA0DI2C$5$l$?e(Brb\_sym\_interned\_p()e$B$O7k6I!"e(Bintern.he$B$K@k8@$@$1;D$7e(B e$B$F\>C$5$l$F$7$^$C$?$h$&$G$9$,!"JQ?t$dDj?t$,Dj5A$5$l$F$$$k$+$rD4e(B e$B$Y$h$&$H$9$k$@$1$G?7$7$$L\>A0$,EPO?$5$l$F$7$^…

---

## [Default text entered in a puts dialog](https://www.ruby-forum.com/t/default-text-entered-in-a-puts-dialog/107350)

<div class="topic-metadata">

**Author:** [@mtnbiker](https://www.ruby-forum.com/u/mtnbiker)\
**Replies:** 4\
**Last updated:** [June 21, 2007, 2:35am UTC](https://www.ruby-forum.com/t/default-text-entered-in-a-puts-dialog/107350 "2007-06-21T02:35:06Z")

</div>

I want to put a default answer in the text entry box that appears when you puts some text. photoGMT = -4 puts “What time zone are the photos in?” answer = gets.chomp.to\_i I’d like photoGMT to appear as a default ans…

---

## [Class \<\< self idiom](https://www.ruby-forum.com/t/class-self-idiom/107374)

<div class="topic-metadata">

**Author:** [@surge](https://www.ruby-forum.com/u/surge)\
**Replies:** 2\
**Last updated:** [June 21, 2007, 1:21am UTC](https://www.ruby-forum.com/t/class-self-idiom/107374 "2007-06-21T01:21:59Z")

</div>

Hello, I have trouble understanding the need for the class \<\< self idiom. For example, let’s say I have this class: class My\_Class def method\_1 end end Now, I want to extend that class. I can do: class My\_Class …

---

## [Strange ... I'm getting crazy](https://www.ruby-forum.com/t/strange-im-getting-crazy/107381)

<div class="topic-metadata">

**Author:** [@j-merrill](https://www.ruby-forum.com/u/j-merrill)\
**Replies:** 5\
**Last updated:** [June 21, 2007, 1:18am UTC](https://www.ruby-forum.com/t/strange-im-getting-crazy/107381 "2007-06-21T01:18:26Z")

</div>

WTF: str = "removed\_email\_address@domain.invalid, removed\_email\_address@domain.invalid, removed\_email\_address@domain.invalid" emails\_array = Array.new emails = str.split(",") emails.each do |single\_str| tmp = single…

---

## [Ncurses menu wrapper](https://www.ruby-forum.com/t/ncurses-menu-wrapper/107353)

<div class="topic-metadata">

**Author:** [@eclubb](https://www.ruby-forum.com/u/eclubb)\
**Replies:** 0\
**Last updated:** [June 20, 2007, 8:27pm UTC](https://www.ruby-forum.com/t/ncurses-menu-wrapper/107353 "2007-06-20T20:27:41Z")

</div>

I noted in the readme for ncurses-ruby that there is no wrapper for the menu library. I’m thinking about writing one, but I want to make sure I’m not duplicating anyone else’s efforts. Does anyone know if any work h…

---

## [Rb2exe info](https://www.ruby-forum.com/t/rb2exe-info/107100)

<div class="topic-metadata">

**Author:** [@mschwab](https://www.ruby-forum.com/u/mschwab)\
**Replies:** 3\
**Last updated:** [June 20, 2007, 7:18pm UTC](https://www.ruby-forum.com/t/rb2exe-info/107100 "2007-06-20T19:18:17Z")

</div>

I heard there’s a program that compiles Ruby scripts to exe’s, but the only pages I found on it were in Japanese. Does anyone have any info about it in English? Mike S.

---

## [Moving photos from a media card](https://www.ruby-forum.com/t/moving-photos-from-a-media-card/107292)

<div class="topic-metadata">

**Author:** [@mtnbiker](https://www.ruby-forum.com/u/mtnbiker)\
**Replies:** 2\
**Last updated:** [June 20, 2007, 7:15pm UTC](https://www.ruby-forum.com/t/moving-photos-from-a-media-card/107292 "2007-06-20T19:15:45Z")

</div>

Trying to move and rename photos from a media card using OS X. I get this error: Errno::EXDEV: Cross-device link - /Volumes/CANON\_DC/DCIM/100CANON/IMG\_2324.JPG or /Volumes/Knobby Aperture Disk/Photos-digital/ Photogr…

---

## [Unsubscribe](https://www.ruby-forum.com/t/unsubscribe/107342)

<div class="topic-metadata">

**Author:** [@nilez](https://www.ruby-forum.com/u/nilez)\
**Replies:** 0\
**Last updated:** [June 20, 2007, 6:40pm UTC](https://www.ruby-forum.com/t/unsubscribe/107342 "2007-06-20T18:40:11Z")

</div>

unsubscribe

---

## [Getting a files mime-type](https://www.ruby-forum.com/t/getting-a-files-mime-type/102129)

<div class="topic-metadata">

**Author:** [@dang](https://www.ruby-forum.com/u/dang)\
**Replies:** 5\
**Last updated:** [June 20, 2007, 5:23pm UTC](https://www.ruby-forum.com/t/getting-a-files-mime-type/102129 "2007-06-20T17:23:53Z")

</div>

Hi, Can anyone tell me if there is a simple way to get the mime-type of a file? (I’ve seen the Mime::Type library, but haven’t figured out how to use it). I’m trying to check the type before processing a bunch of fi…

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

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