# Ruby

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

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

---

## [Getting the name of a class that's in a module](https://www.ruby-forum.com/t/getting-the-name-of-a-class-thats-in-a-module/55206)

<div class="topic-metadata">

**Author:** [@exile](https://www.ruby-forum.com/u/exile)\
**Replies:** 1\
**Last updated:** [March 17, 2006, 11:12pm UTC](https://www.ruby-forum.com/t/getting-the-name-of-a-class-thats-in-a-module/55206 "2006-03-17T23:12:53Z")

</div>

‘some\_object.class.to\_s’ doesn’t work because it returns the entire hierarchy, i.e ‘SomeModule::SomeClass’. I could do some string ops on that but it seems there would be an easier way. Here’s an example: class Me…

---

## [Installing and running Hieraki 2.0.1](https://www.ruby-forum.com/t/installing-and-running-hieraki-2-0-1/55213)

<div class="topic-metadata">

**Author:** [@sauy7](https://www.ruby-forum.com/u/sauy7)\
**Replies:** 0\
**Last updated:** [March 17, 2006, 11:09pm UTC](https://www.ruby-forum.com/t/installing-and-running-hieraki-2-0-1/55213 "2006-03-17T23:09:51Z")

</div>

Hi I just downloaded and installed Hieraki 2.0.1. It seem their support page is full of spam and there are not emails on their email list, so, I am posting here in hopes of getting some help. First, it doesn’t seem…

---

## [Validation of form whoch is a image](https://www.ruby-forum.com/t/validation-of-form-whoch-is-a-image/83404)

<div class="topic-metadata">

**Author:** [@misiek](https://www.ruby-forum.com/u/misiek)\
**Replies:** 0\
**Last updated:** [March 17, 2006, 10:54pm UTC](https://www.ruby-forum.com/t/validation-of-form-whoch-is-a-image/83404 "2006-03-17T22:54:33Z")

</div>

I don not let upload the file which are not images I need only jpg gif and png how to do that I am confuse =\> google.com

---

## [Validates\_format\_of :zipcode](https://www.ruby-forum.com/t/validates-format-of-zipcode/55195)

<div class="topic-metadata">

**Author:** [@misiek](https://www.ruby-forum.com/u/misiek)\
**Replies:** 1\
**Last updated:** [March 17, 2006, 9:04pm UTC](https://www.ruby-forum.com/t/validates-format-of-zipcode/55195 "2006-03-17T21:04:36Z")

</div>

how can I set the validation of the zipcode ?

---

## [Re: Compile Ruby 1.8.4 on HP-UX 11](https://www.ruby-forum.com/t/re-compile-ruby-1-8-4-on-hp-ux-11/55181)

<div class="topic-metadata">

**Author:** [@McDevittS\_Chris](https://www.ruby-forum.com/u/McDevittS_Chris)\
**Replies:** 1\
**Last updated:** [March 17, 2006, 8:43pm UTC](https://www.ruby-forum.com/t/re-compile-ruby-1-8-4-on-hp-ux-11/55181 "2006-03-17T20:43:35Z")

</div>

Thanks. I instilled gcc and ran configure. It received and error, so I checked the config.log and found this: gcc version 4.1.0 configure:1972: $? = 0 configure:1974: gcc -V \</dev/null \>&5 gcc: ‘-V’ option must ha…

---

## [Deleting from hash question](https://www.ruby-forum.com/t/deleting-from-hash-question/83114)

<div class="topic-metadata">

**Author:** [@jimmyether](https://www.ruby-forum.com/u/jimmyether)\
**Replies:** 4\
**Last updated:** [March 17, 2006, 8:42pm UTC](https://www.ruby-forum.com/t/deleting-from-hash-question/83114 "2006-03-17T20:42:03Z")

</div>

I’m a ruby newbie and have what is probably a relatively simple problem I’m trying to solve (though I’m using rails, this is more a ruby question). Say that I created a hash: TASKS = { “homework” =\> “Do Your Homework…

---

## [Irb completion in Emacs](https://www.ruby-forum.com/t/irb-completion-in-emacs/55165)

<div class="topic-metadata">

**Author:** [@gnuvince](https://www.ruby-forum.com/u/gnuvince)\
**Replies:** 1\
**Last updated:** [March 17, 2006, 8:09pm UTC](https://www.ruby-forum.com/t/irb-completion-in-emacs/55165 "2006-03-17T20:09:47Z")

</div>

Hello, does anyone know if it’s possible to have irb’s tab completion when running inside inside Emacs? Thanks

---

## [Csv updater](https://www.ruby-forum.com/t/csv-updater/82933)

<div class="topic-metadata">

**Author:** [@geoff](https://www.ruby-forum.com/u/geoff)\
**Replies:** 5\
**Last updated:** [March 17, 2006, 7:51pm UTC](https://www.ruby-forum.com/t/csv-updater/82933 "2006-03-17T19:51:15Z")

</div>

Greetings! I got some help on this a while back and have been tweaking on it trying to get it do work right. What I want to do is take a csv file, and whenever there is a blank cell update it with the info from the c…

---

## [Explanation of if \_\_FILE\_\_ == $0](https://www.ruby-forum.com/t/explanation-of-if-file-0/55180)

<div class="topic-metadata">

**Author:** [@PJ\_Hyett](https://www.ruby-forum.com/u/PJ_Hyett)\
**Replies:** 5\
**Last updated:** [March 17, 2006, 7:09pm UTC](https://www.ruby-forum.com/t/explanation-of-if-file-0/55180 "2006-03-17T19:09:38Z")

</div>

So I’ve tracked this down: FILE is the name of the current source file $0 at the top level is the name of the top-level program being executed But I’m still confused as to what this if statement is accomplishing? It’…

---

## [Where does core dump info go?](https://www.ruby-forum.com/t/where-does-core-dump-info-go/55190)

<div class="topic-metadata">

**Author:** [@akm](https://www.ruby-forum.com/u/akm)\
**Replies:** 0\
**Last updated:** [March 17, 2006, 7:07pm UTC](https://www.ruby-forum.com/t/where-does-core-dump-info-go/55190 "2006-03-17T19:07:43Z")

</div>

Hi, I’m getting a core dump when using RForum; it happens when I try to delete a post from a deleted user. Is there a record of the cause of the core dump written anywhere? I can’t seem to find it. Thanks, Andrew

---

## [Rake rules question](https://www.ruby-forum.com/t/rake-rules-question/55108)

<div class="topic-metadata">

**Author:** [@itsme213](https://www.ruby-forum.com/u/itsme213)\
**Replies:** 3\
**Last updated:** [March 17, 2006, 7:06pm UTC](https://www.ruby-forum.com/t/rake-rules-question/55108 "2006-03-17T19:06:25Z")

</div>

I am using RMagick to do multi-stage processing of some images. Can I have two different rules to process .PNG files in two different directories? rule stage\_0/.png =\> source/.png do |t| make\_0 t.source, t.name end …

---

## [Unit testing with webrick](https://www.ruby-forum.com/t/unit-testing-with-webrick/55189)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 0\
**Last updated:** [March 17, 2006, 7:03pm UTC](https://www.ruby-forum.com/t/unit-testing-with-webrick/55189 "2006-03-17T19:03:10Z")

</div>

Hi. I’ve written a unit test that starts up WEBrick in a new thread in the setup method. I was wondering what the best way would be to guarantee that WEBrick is ready to accept connections before leaving the setup m…

---

## [Printing ruby code](https://www.ruby-forum.com/t/printing-ruby-code/55005)

<div class="topic-metadata">

**Author:** [@Zakaria](https://www.ruby-forum.com/u/Zakaria)\
**Replies:** 7\
**Last updated:** [March 17, 2006, 6:28pm UTC](https://www.ruby-forum.com/t/printing-ruby-code/55005 "2006-03-17T18:28:20Z")

</div>

Hi, What is the best way/tools to printing ruby code to a piece of paper with: method index line number syntax highlight ?. Regards, – Zakaria removed\_email\_address@domain.invalid Yahoo!: z4k4ri4 htt…

---

## [Sqlite3-ruby bug](https://www.ruby-forum.com/t/sqlite3-ruby-bug/83197)

<div class="topic-metadata">

**Author:** [@Jon\_ASLambert](https://www.ruby-forum.com/u/Jon_ASLambert)\
**Replies:** 0\
**Last updated:** [March 17, 2006, 5:34pm UTC](https://www.ruby-forum.com/t/sqlite3-ruby-bug/83197 "2006-03-17T17:34:11Z")

</div>

Sane as earlier post. Code to reproduce different. This is using sqlite3-ruby (1.1.0) require ‘sqlite3’ require ‘pp’ require ‘base64’ def self.decode(str) Marshal.load(Base64.decode64(str)) end def self.encode…

---

## [Ruby-sqlite 2.2.3 bug](https://www.ruby-forum.com/t/ruby-sqlite-2-2-3-bug/55174)

<div class="topic-metadata">

**Author:** [@Jon\_ASLambert](https://www.ruby-forum.com/u/Jon_ASLambert)\
**Replies:** 0\
**Last updated:** [March 17, 2006, 5:15pm UTC](https://www.ruby-forum.com/t/ruby-sqlite-2-2-3-bug/55174 "2006-03-17T17:15:47Z")

</div>

This is using sqlite-ruby (2.2.3) require ‘sqlite’ require ‘pp’ class Foo end db = SQLite::Database.open(“test.sqlite”) begin db.execute(“drop table test;”) rescue end db.execute(“create table test (id integer…

---

## [Evaluating the string in a variable to use as a method name](https://www.ruby-forum.com/t/evaluating-the-string-in-a-variable-to-use-as-a-method-name/55056)

<div class="topic-metadata">

**Author:** [@heinous\_Ssent\_by\_Na](https://www.ruby-forum.com/u/heinous_Ssent_by_Na)\
**Replies:** 4\
**Last updated:** [March 17, 2006, 3:56pm UTC](https://www.ruby-forum.com/t/evaluating-the-string-in-a-variable-to-use-as-a-method-name/55056 "2006-03-17T15:56:09Z")

</div>

This may be a more generic Ruby question, so I’m going to ask on the Ruby forum, but I’m trying to figure out if there is a way to pass in the string value of a variable as the name of a method. For example, I would…

---

## [Delayed File I/O & ZLIB - Any help would be appreciated](https://www.ruby-forum.com/t/delayed-file-i-o-zlib-any-help-would-be-appreciated/82894)

<div class="topic-metadata">

**Author:** [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Replies:** 4\
**Last updated:** [March 17, 2006, 3:46pm UTC](https://www.ruby-forum.com/t/delayed-file-i-o-zlib-any-help-would-be-appreciated/82894 "2006-03-17T15:46:56Z")

</div>

Folks, Hey Folks, I’ve written a script to generate a list of all files on a machine, then zip the results. Im going to use it to audit some file servers. The problem is that the ZIP compression/decrompression isn’t…

---

## [Libxml: handling parse errors](https://www.ruby-forum.com/t/libxml-handling-parse-errors/55158)

<div class="topic-metadata">

**Author:** [@Mage](https://www.ruby-forum.com/u/Mage)\
**Replies:** 1\
**Last updated:** [March 17, 2006, 3:03pm UTC](https://www.ruby-forum.com/t/libxml-handling-parse-errors/55158 "2006-03-17T15:03:34Z")

</div>

Hello, I found the libxml API very nice, so I started using it. When I try to open a non-well-formed xml, two things happen: errors are displayed on screen (stderr) exception raises Well, I would like to catch the e…

---

## [Re: add to words syntaxes](https://www.ruby-forum.com/t/re-add-to-words-syntaxes/83116)

<div class="topic-metadata">

**Author:** [@dani](https://www.ruby-forum.com/u/dani)\
**Replies:** 1\
**Last updated:** [March 17, 2006, 3:00pm UTC](https://www.ruby-forum.com/t/re-add-to-words-syntaxes/83116 "2006-03-17T15:00:20Z")

</div>

Hi! Sorry for me, I’ve puted the lines what you wrote but it can be, that to wrong place or something, because I can’t bring it to life. Would you please look for it? Ive attach my script… Regards: Daniel

---

## [Small optimization tips](https://www.ruby-forum.com/t/small-optimization-tips/54840)

<div class="topic-metadata">

**Author:** [@gnuvince](https://www.ruby-forum.com/u/gnuvince)\
**Replies:** 9\
**Last updated:** [March 17, 2006, 2:54pm UTC](https://www.ruby-forum.com/t/small-optimization-tips/54840 "2006-03-17T14:54:01Z")

</div>

Hello all, I was working on a little script earlier, which I thought was too slow for my taste. It’s now about 5-6x faster than it originally was. Normally, this would’ve been enough, but being very curious about Rub…

---

## [Kirbybase Hacks NilClass](https://www.ruby-forum.com/t/kirbybase-hacks-nilclass/76697)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 36\
**Last updated:** [March 17, 2006, 12:09pm UTC](https://www.ruby-forum.com/t/kirbybase-hacks-nilclass/76697 "2006-03-17T12:09:15Z")

</div>

I’m examining Kirbybase for use it a project and was surprised to find this bit of code in it: #----------------------------------------------------------------------- NilClass #----------------------------------------…

---

## [Removing diacritical marks](https://www.ruby-forum.com/t/removing-diacritical-marks/55124)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 2\
**Last updated:** [March 17, 2006, 10:50am UTC](https://www.ruby-forum.com/t/removing-diacritical-marks/55124 "2006-03-17T10:50:28Z")

</div>

Hello Rubyists, I would like to remove the accents marks (a.k.a diacritical marks) from a String. Assuming “line” is a String, this gets most of them: line.gsub!(/\[Ã?ÃÃ?Ã?Ã?\]/,"A") line.gsub!(/\[Ã¢Ã£Ã¤Ã Ã¡\]/,"a") li…

---

## [Does exists a module similar to the Perl's Encode::Guess in](https://www.ruby-forum.com/t/does-exists-a-module-similar-to-the-perls-encode-guess-in/83082)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [March 17, 2006, 8:36am UTC](https://www.ruby-forum.com/t/does-exists-a-module-similar-to-the-perls-encode-guess-in/83082 "2006-03-17T08:36:05Z")

</div>

nearly everything is in the subject : does exists a module similar to the Perl’s Encode::Guess in Ruby ? i have to convert a bunch of html files some of those (roughly 40 %) doesn’t declare the charset. someone gave …

---

## [Ruby and EJBs](https://www.ruby-forum.com/t/ruby-and-ejbs/79711)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 5\
**Last updated:** [March 17, 2006, 7:28am UTC](https://www.ruby-forum.com/t/ruby-and-ejbs/79711 "2006-03-17T07:28:26Z")

</div>

Hello All, I know this topic has been somewhat addressed in the past but I would really appreciate further help. I want to call a function that is available as an EJB. Both ruby and the EJB are run on my localhost. T…

---

## [Quirks with \\0 in double quotes](https://www.ruby-forum.com/t/quirks-with-0-in-double-quotes/55130)

<div class="topic-metadata">

**Author:** [@Joel\_VanderWerf](https://www.ruby-forum.com/u/Joel_VanderWerf)\
**Replies:** 0\
**Last updated:** [March 17, 2006, 6:24am UTC](https://www.ruby-forum.com/t/quirks-with-0-in-double-quotes/55130 "2006-03-17T06:24:17Z")

</div>

Are these bugs? This is ruby-1.8.4. The YAML spec seems to say “\\0” is legit. require ‘yaml’ m = YAML.load(\<\<END) a: 4 b: “\\0\\0” c: 5 END p m puts m = YAML.load(\<\<END) a: 4 b: “\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0” b:…

---

## [Newbie question](https://www.ruby-forum.com/t/newbie-question/82009)

<div class="topic-metadata">

**Author:** [@claptrap](https://www.ruby-forum.com/u/claptrap)\
**Replies:** 3\
**Last updated:** [March 17, 2006, 3:44am UTC](https://www.ruby-forum.com/t/newbie-question/82009 "2006-03-17T03:44:24Z")

</div>

I stumbled to Ruby by accident and read the beginning of Why’s guide, which sounded a a bit more fun than some other guides. I wonder if my 200MHz P2 laptop with Win98 can handle the program (compiler?) Meanwhile I’ve…

---

## [Re: Scope of an @variable](https://www.ruby-forum.com/t/re-scope-of-an-variable/54879)

<div class="topic-metadata">

**Author:** [@William\_SBillS\_Froe](https://www.ruby-forum.com/u/William_SBillS_Froe)\
**Replies:** 5\
**Last updated:** [March 17, 2006, 2:13am UTC](https://www.ruby-forum.com/t/re-scope-of-an-variable/54879 "2006-03-17T02:13:42Z")

</div>

I’m also a newbie so others feel free to correct me as well :wink: Your understanding is correct in that @name applies to the specific instance of the class and the @@name applies to all instances of the class. Hope …

---

## [Installing 1.8.4 on windows](https://www.ruby-forum.com/t/installing-1-8-4-on-windows/54957)

<div class="topic-metadata">

**Author:** [@joep](https://www.ruby-forum.com/u/joep)\
**Replies:** 4\
**Last updated:** [March 17, 2006, 12:18am UTC](https://www.ruby-forum.com/t/installing-1-8-4-on-windows/54957 "2006-03-17T00:18:10Z")

</div>

Let me start by saying Yes! I have seaarched this list, I have done several googles, and I have gone to the one click installer home / news / and FAQ page and what I came up with was a lot of confusing, conflicting ne…

---

## [Full Time Ruby Position in Provo, UT](https://www.ruby-forum.com/t/full-time-ruby-position-in-provo-ut/55091)

<div class="topic-metadata">

**Author:** [@pat\_eyler](https://www.ruby-forum.com/u/pat_eyler)\
**Replies:** 0\
**Last updated:** [March 16, 2006, 10:46pm UTC](https://www.ruby-forum.com/t/full-time-ruby-position-in-provo-ut/55091 "2006-03-16T22:46:27Z")

</div>

Posted for a friend: FamilyLearn, the developer of exciting family and personal history websites is looking for a top notch Ruby and Ruby on Rails programmer with Ajax skills to help take our websites to the next leve…

---

## [Build 3x3 table from one array](https://www.ruby-forum.com/t/build-3x3-table-from-one-array/55057)

<div class="topic-metadata">

**Author:** [@forest](https://www.ruby-forum.com/u/forest)\
**Replies:** 7\
**Last updated:** [March 16, 2006, 10:12pm UTC](https://www.ruby-forum.com/t/build-3x3-table-from-one-array/55057 "2006-03-16T22:12:44Z")

</div>

I am new to ruby and still haven’t got my mind around iterators although I think they are really cool. I am stuck trying to figure out how to take an array of data and dynamically build a 3x3 html table from it withou…

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

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