# Ruby

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

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

---

## [How to search for ascii char sequence in binary file](https://www.ruby-forum.com/t/how-to-search-for-ascii-char-sequence-in-binary-file/118058)

<div class="topic-metadata">

**Author:** [@eclubb](https://www.ruby-forum.com/u/eclubb)\
**Replies:** 1\
**Last updated:** [October 23, 2007, 5:22pm UTC](https://www.ruby-forum.com/t/how-to-search-for-ascii-char-sequence-in-binary-file/118058 "2007-10-23T17:22:02Z")

</div>

So I’m trying to convert e.g. ‘RIFF’ to e.g. ‘52494646’. What’s the best way to do that? I don’t know what the former string will be, be I know it will be exactly four characters. I’m searching a binary file for the…

---

## [Issue in faster\_csv](https://www.ruby-forum.com/t/issue-in-faster-csv/118047)

<div class="topic-metadata">

**Author:** [@smeitei](https://www.ruby-forum.com/u/smeitei)\
**Replies:** 6\
**Last updated:** [October 23, 2007, 4:27pm UTC](https://www.ruby-forum.com/t/issue-in-faster-csv/118047 "2007-10-23T16:27:09Z")

</div>

I wanted to read a csv file and do some manipulation on it so i tried writing a small program but i get this error ##########T his is the program require “faster\_csv” FasterCSV.foreach(“C:\\rubyprograms\\Input.csv”) d…

---

## [How does overload work in ruby?](https://www.ruby-forum.com/t/how-does-overload-work-in-ruby/117893)

<div class="topic-metadata">

**Author:** [@shuaib85](https://www.ruby-forum.com/u/shuaib85)\
**Replies:** 5\
**Last updated:** [October 23, 2007, 4:24pm UTC](https://www.ruby-forum.com/t/how-does-overload-work-in-ruby/117893 "2007-10-23T16:24:04Z")

</div>

Hello guys I was trying to overload one method but it does not work like Java. I noticed it only uses the first method that it meets. is there any special way for overloading in ruby. class Overloading def sum(a, b) …

---

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

<div class="topic-metadata">

**Author:** [@stoffe](https://www.ruby-forum.com/u/stoffe)\
**Replies:** 0\
**Last updated:** [October 23, 2007, 4:13pm UTC](https://www.ruby-forum.com/t/no-subject/118052 "2007-10-23T16:13:30Z")

</div>

unsubscribe

---

## [Conflicts between using respond\_to? and extending Ruby](https://www.ruby-forum.com/t/conflicts-between-using-respond-to-and-extending-ruby/117919)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 26\
**Last updated:** [October 23, 2007, 3:29pm UTC](https://www.ruby-forum.com/t/conflicts-between-using-respond-to-and-extending-ruby/117919 "2007-10-23T15:29:35Z")

</div>

Hi– I recently cam across an interesting conflict between open-uri.rb and Facets rendition of kernel/metaid.rb. Facets defines a general extension Kernel#meta, and open-uri defines OpenURI::Meta#meta. open- uri uses …

---

## [Re: format string for array question](https://www.ruby-forum.com/t/re-format-string-for-array-question/118045)

<div class="topic-metadata">

**Author:** [@robkuz](https://www.ruby-forum.com/u/robkuz)\
**Replies:** 0\
**Last updated:** [October 23, 2007, 3:23pm UTC](https://www.ruby-forum.com/t/re-format-string-for-array-question/118045 "2007-10-23T15:23:43Z")

</div>

Cool, Thank you for the help! Robert K. removed\_email\_address@domain.invalid ----- Original Message ---- From: Gennady B. removed\_email\_address@domain.invalid To: ruby-talk ML removed\_email\_address@domain.invalid …

---

## [Re: ID3 Tags (#136)](https://www.ruby-forum.com/t/re-id3-tags-136/225964)

<div class="topic-metadata">

**Author:** [@lodestone](https://www.ruby-forum.com/u/lodestone)\
**Replies:** 2\
**Last updated:** [October 23, 2007, 3:19pm UTC](https://www.ruby-forum.com/t/re-id3-tags-136/225964 "2007-10-23T15:19:02Z")

</div>

class ID3 def initialize(tags) @tags = tags @genres = \[‘Classic Rock’, ‘Country’, ‘Dance’, ‘Disco’, ‘Funk’, ‘Grunge’, ‘Hip-Hop’, ‘Jazz’, ‘Metal’, ‘New Age’, ‘Oldies’, ‘Other’, ‘Pop’, ‘R&B’, ‘Rap’, ‘Reggae’, ‘Rock’,…

---

## [IO.pipe](https://www.ruby-forum.com/t/io-pipe/118039)

<div class="topic-metadata">

**Author:** [@crazybass](https://www.ruby-forum.com/u/crazybass)\
**Replies:** 0\
**Last updated:** [October 23, 2007, 2:55pm UTC](https://www.ruby-forum.com/t/io-pipe/118039 "2007-10-23T14:55:51Z")

</div>

Hello I am having a problem with IO.pipe I have the following code: … img = read\_pipe.read() im = Magick::Image::read\_inline(Base64.b64encode(img)).first im.format = “PNG” puts “1” read\_pipe, write\_pipe = IO.pipe …

---

## [Problems with setup.rb and metaconfig](https://www.ruby-forum.com/t/problems-with-setup-rb-and-metaconfig/118037)

<div class="topic-metadata">

**Author:** [@lodestone](https://www.ruby-forum.com/u/lodestone)\
**Replies:** 0\
**Last updated:** [October 23, 2007, 2:49pm UTC](https://www.ruby-forum.com/t/problems-with-setup-rb-and-metaconfig/118037 "2007-10-23T14:49:44Z")

</div>

I’m doing some fiddling around with a setup.rb package, and wanted to be able to pass in another invocation time option, a la ruby setup.rb –option. The docs seem to suggest using metaconfig to add this, so I rolled i…

---

## [Problem connecting with ruby-net-ldap - Net::BER::BerError](https://www.ruby-forum.com/t/problem-connecting-with-ruby-net-ldap-net-bererror/117969)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 8\
**Last updated:** [October 23, 2007, 2:33pm UTC](https://www.ruby-forum.com/t/problem-connecting-with-ruby-net-ldap-net-bererror/117969 "2007-10-23T14:33:55Z")

</div>

Hi all, Ruby 1.8.6 Windows XP Pro ruby-net-ldap 0.0.4 I’m getting a strange error when I try this simple script, where LDAP\_SERVER is a 3rd party ldap server: ldap = Net::LDAP.new(:host =\> LDAP\_SERVER, :port =\> 999…

---

## [Passing a variable as a pointer to a windows DLL method](https://www.ruby-forum.com/t/passing-a-variable-as-a-pointer-to-a-windows-dll-method/118034)

<div class="topic-metadata">

**Author:** [@citizen\_snips](https://www.ruby-forum.com/u/citizen_snips)\
**Replies:** 0\
**Last updated:** [October 23, 2007, 2:26pm UTC](https://www.ruby-forum.com/t/passing-a-variable-as-a-pointer-to-a-windows-dll-method/118034 "2007-10-23T14:26:39Z")

</div>

hi guys, i’m having a problem with a DLL method call which requires a few pointers. the code is seg faulting (on the openPort call), so any advice is appreciated. i’ve been able to call other methods from the same d…

---

## [Regex replace on a file](https://www.ruby-forum.com/t/regex-replace-on-a-file/117999)

<div class="topic-metadata">

**Author:** [@eggie5](https://www.ruby-forum.com/u/eggie5)\
**Replies:** 2\
**Last updated:** [October 23, 2007, 1:35pm UTC](https://www.ruby-forum.com/t/regex-replace-on-a-file/117999 "2007-10-23T13:35:24Z")

</div>

I want to do a simple regex replace on a file. I want to replace this multiline match \[\\\\S\\\\s\]\*? with this string: How can I do this with ruby assuming my file is: /html/page.html

---

## [Main-2.1.0](https://www.ruby-forum.com/t/main-2-1-0/196496)

<div class="topic-metadata">

**Author:** [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Replies:** 6\
**Last updated:** [October 23, 2007, 12:39pm UTC](https://www.ruby-forum.com/t/main-2-1-0/196496 "2007-10-23T12:39:09Z")

</div>

NAME main.rb SYNOPSIS a class factory and dsl for generating command line programs real quick URI http://rubyforge.org/projects/codeforpeople/ http://codeforpeople.com/lib/ruby/ INSTALL gem install main HISTORY …

---

## [Pattern match with UTF-8 regexp and EUC-JP string](https://www.ruby-forum.com/t/pattern-match-with-utf-8-regexp-and-euc-jp-string/117838)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 1\
**Last updated:** [October 23, 2007, 11:56am UTC](https://www.ruby-forum.com/t/pattern-match-with-utf-8-regexp-and-euc-jp-string/117838 "2007-10-23T11:56:53Z")

</div>

/./u e$B$H$$$&e(B UTF-8 e$B$Je(B 1e$BJ8;z$rI=8=$9$k%Q%?!\<%s$Ke(B EUC-JP e$B$Je(B “\\xa1\\xa1” e$B$H$$$&e(B 1e$BJ8;z$JJ8;zNs$r%^%C%A$5$;$?$H$-!“e(B”\\241" e$B$He(B e$B$$$&e(B 1e$B%P%$%H$K%^%C%A$7$^$9!#e(B % ./ruby -ve ‘…

---

## [Computers + floating-point = a chore](https://www.ruby-forum.com/t/computers-floating-point-a-chore/117975)

<div class="topic-metadata">

**Author:** [@Yossef\_M](https://www.ruby-forum.com/u/Yossef_M)\
**Replies:** 4\
**Last updated:** [October 23, 2007, 11:51am UTC](https://www.ruby-forum.com/t/computers-floating-point-a-chore/117975 "2007-10-23T11:51:02Z")

</div>

I recall seeing a few posts about the “fun” involving floating-point representation of numbers, but this is something I found a little surprising: Cassady:~ yossef$ irb --prompt simple require ‘bigdecimal’ =\> true …

---

## [How do I save a row update using Sequel?](https://www.ruby-forum.com/t/how-do-i-save-a-row-update-using-sequel/117981)

<div class="topic-metadata">

**Author:** [@cremes](https://www.ruby-forum.com/u/cremes)\
**Replies:** 1\
**Last updated:** [October 23, 2007, 11:40am UTC](https://www.ruby-forum.com/t/how-do-i-save-a-row-update-using-sequel/117981 "2007-10-23T11:40:26Z")

</div>

I really like the simplicity of Sequel \[1\], but right now it is giving me fits. After I insert a row into the database, I can’t seem to get it to persist any updates that I make to that row. Here’s an example. \[creme…

---

## [More elegant way to condense a date/time string?](https://www.ruby-forum.com/t/more-elegant-way-to-condense-a-date-time-string/117968)

<div class="topic-metadata">

**Author:** [@jfry](https://www.ruby-forum.com/u/jfry)\
**Replies:** 6\
**Last updated:** [October 23, 2007, 11:40am UTC](https://www.ruby-forum.com/t/more-elegant-way-to-condense-a-date-time-string/117968 "2007-10-23T11:40:26Z")

</div>

Hey all, I’m a relative ruby beginner, looking to create short-ish date/time strings. I came up with: Time.now.xmlschema.delete(’:-’).chop.chop.chop.chop #yields something like 20071022T123910 Which works for me…bu…

---

## [Read mp3 tags](https://www.ruby-forum.com/t/read-mp3-tags/118017)

<div class="topic-metadata">

**Author:** [@freedom](https://www.ruby-forum.com/u/freedom)\
**Replies:** 0\
**Last updated:** [October 23, 2007, 11:28am UTC](https://www.ruby-forum.com/t/read-mp3-tags/118017 "2007-10-23T11:28:04Z")

</div>

I’m a newbie for Ruby. I am reading an application to read mp3 tags. I’ve below code to read Binary file, please help me to make full code and rhtml viewing file when submit a form and show data on browser. ==========…

---

## [$B3HD%%i%$%V%i%jFb$G$N(B SIGVTALRM](https://www.ruby-forum.com/t/b3hd-i-v-i-jfb-g-n-b-sigvtalrm/115373)

<div class="topic-metadata">

**Author:** [@SSSBSHS\_SSSSS5SRSmS](https://www.ruby-forum.com/u/SSSBSHS_SSSSS5SRSmS)\
**Replies:** 9\
**Last updated:** [October 23, 2007, 11:27am UTC](https://www.ruby-forum.com/t/b3hd-i-v-i-jfb-g-n-b-sigvtalrm/115373 "2007-10-23T11:27:32Z")

</div>

e$B$H$\_$?$G$9!#e(B Ruby e$B$G%9%l%C%I$r@8@.$9$k$He(B SIGVTALRM e$B$,e(B 10ms e$BKh$KDLCN$5$l$F!"$=$l$Ge(B Ruby e$B%9%l%C%I$N%3%s%F%-%9%H%9%$%C%A$,@)8f$5$l$F$$$k$H;W$&$N$G$9$,!J=hM}e(B e$B7O$K$h$k$+$b!K!"e(BC e$B$G=q…

---

## [Semacode and ruby](https://www.ruby-forum.com/t/semacode-and-ruby/118014)

<div class="topic-metadata">

**Author:** [@crazybass](https://www.ruby-forum.com/u/crazybass)\
**Replies:** 0\
**Last updated:** [October 23, 2007, 11:13am UTC](https://www.ruby-forum.com/t/semacode-and-ruby/118014 "2007-10-23T11:13:12Z")

</div>

Hello anyone already used semacode extension for ruby?

---

## [Another (simple!) eval question!](https://www.ruby-forum.com/t/another-simple-eval-question/117997)

<div class="topic-metadata">

**Author:** [@mouse\_059](https://www.ruby-forum.com/u/mouse_059)\
**Replies:** 1\
**Last updated:** [October 23, 2007, 11:07am UTC](https://www.ruby-forum.com/t/another-simple-eval-question/117997 "2007-10-23T11:07:01Z")

</div>

greetings Rubyists, Still trying to wrap my head around metaprogramming. def analyze(args) stuff total is defined up here and is equal to some amount of seconds elapsed (say 100,000) day, hour, min = 0, 0, 0 loop do…

---

## [Removing a directory that isn't empty](https://www.ruby-forum.com/t/removing-a-directory-that-isnt-empty/117923)

<div class="topic-metadata">

**Author:** [@mobileamusement](https://www.ruby-forum.com/u/mobileamusement)\
**Replies:** 3\
**Last updated:** [October 23, 2007, 10:04am UTC](https://www.ruby-forum.com/t/removing-a-directory-that-isnt-empty/117923 "2007-10-23T10:04:35Z")

</div>

What would be the best way to use Dir.rmdir to delete a directory that isn’t empty? I think it would involve performing a recursive delete, this is trivial in bash, but what about in Ruby? Many thanks Gabriel D.

---

## [Writing to a file help](https://www.ruby-forum.com/t/writing-to-a-file-help/117992)

<div class="topic-metadata">

**Author:** [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Replies:** 3\
**Last updated:** [October 23, 2007, 2:43am UTC](https://www.ruby-forum.com/t/writing-to-a-file-help/117992 "2007-10-23T02:43:25Z")

</div>

I am trying to read 1 file then create another file from that 1. My problem I am having is that my file is not being formated the same way I am telling it. So for example I have line\_a = %{#{i.to\_s.rjust(6, “0”)}|#{ar…

---

## [Ruby + Apache, scripts not being interpreted](https://www.ruby-forum.com/t/ruby-apache-scripts-not-being-interpreted/117129)

<div class="topic-metadata">

**Author:** [@nobrow](https://www.ruby-forum.com/u/nobrow)\
**Replies:** 3\
**Last updated:** [October 23, 2007, 2:13am UTC](https://www.ruby-forum.com/t/ruby-apache-scripts-not-being-interpreted/117129 "2007-10-23T02:13:03Z")

</div>

I am trying to get Ruby running on Apache. I may or may not have a problem. What do you think? I have a test site called ruby-test set up with a vhost. When I go to rails-test/ I see the “Welcome Aboard” page. But whe…

---

## [Is Ruby For Me?](https://www.ruby-forum.com/t/is-ruby-for-me/117830)

<div class="topic-metadata">

**Author:** [@tonydm](https://www.ruby-forum.com/u/tonydm)\
**Replies:** 25\
**Last updated:** [October 23, 2007, 12:17am UTC](https://www.ruby-forum.com/t/is-ruby-for-me/117830 "2007-10-23T00:17:28Z")

</div>

Hi all, I’ve recently discovered Ruby/Ruby on Rails. Or more accurately, I have discovered it on an introductory level. I.E. I’ve read bits and pieces on the internet and the initial pages of a book or two killing ti…

---

## [Why is rbuygem required?](https://www.ruby-forum.com/t/why-is-rbuygem-required/117967)

<div class="topic-metadata">

**Author:** [@glacius](https://www.ruby-forum.com/u/glacius)\
**Replies:** 1\
**Last updated:** [October 22, 2007, 11:25pm UTC](https://www.ruby-forum.com/t/why-is-rbuygem-required/117967 "2007-10-22T23:25:50Z")

</div>

Maybe a very simple question but what exactly is included when you require rubygems? why is is required for certain modules like net-ssh thanks

---

## [Mixing define\_function and class methods](https://www.ruby-forum.com/t/mixing-define-function-and-class-methods/117972)

<div class="topic-metadata">

**Author:** [@Garret\_K](https://www.ruby-forum.com/u/Garret_K)\
**Replies:** 1\
**Last updated:** [October 22, 2007, 10:47pm UTC](https://www.ruby-forum.com/t/mixing-define-function-and-class-methods/117972 "2007-10-22T22:47:08Z")

</div>

Hi, I’m sure if I’m missing something fundamental, but when you run the code below with comments intact it won’t execute, claiming that: …/test.rb:13:in something': undefined methodsome\_function’ for #\<B:0x2b9c102564…

---

## [Mtime for ftp](https://www.ruby-forum.com/t/mtime-for-ftp/117729)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 3\
**Last updated:** [October 22, 2007, 9:25pm UTC](https://www.ruby-forum.com/t/mtime-for-ftp/117729 "2007-10-22T21:25:43Z")

</div>

Hi, I’d like to go to an ftp site and check the dates of available files there. (I only want today files.) I see that ftp, from ‘net/ftp’ has an mtime method. But, I can’t seem to get it to work. Here’s what I’ve tri…

---

## [RubyGems Beta 0.9.4.6](https://www.ruby-forum.com/t/rubygems-beta-0-9-4-6/117793)

<div class="topic-metadata">

**Author:** [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Replies:** 19\
**Last updated:** [October 22, 2007, 8:25pm UTC](https://www.ruby-forum.com/t/rubygems-beta-0-9-4-6/117793 "2007-10-22T20:25:25Z")

</div>

RubyGems 0.9.4.6 is a beta release for the upcoming 0.9.5 which adds several new features and fixes several bugs. To upgrade to the beta: gem update --system --source http://segment7.net/ A tar.gz and .zip of the bet…

---

## [Self-replicating Ruby](https://www.ruby-forum.com/t/self-replicating-ruby/117884)

<div class="topic-metadata">

**Author:** [@Frank\_JSLhota](https://www.ruby-forum.com/u/Frank_JSLhota)\
**Replies:** 5\
**Last updated:** [October 22, 2007, 7:37pm UTC](https://www.ruby-forum.com/t/self-replicating-ruby/117884 "2007-10-22T19:37:21Z")

</div>

Dear Ruby fans, A common Lisp exercise is to write a Lisp program that writes its own source code to standard output. Reading from a source file is not permitted. This leads one to wonder: what is the smallest and / …

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

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