# Ruby

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

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

---

## [1.8/1.9 compiled library binary compatibility](https://www.ruby-forum.com/t/1-8-1-9-compiled-library-binary-compatibility/115575)

<div class="topic-metadata">

**Author:** [@absolute-beginner](https://www.ruby-forum.com/u/absolute-beginner)\
**Replies:** 2\
**Last updated:** [September 26, 2007, 6:19pm UTC](https://www.ruby-forum.com/t/1-8-1-9-compiled-library-binary-compatibility/115575 "2007-09-26T18:19:04Z")

</div>

Hi I’m wondering whether extension libraries compiled against 1.8 will work with 1.9, and/or the other way around. I know the C API is little-changed, but will people offering add-ons binaries need to offer two versi…

---

## [Getting started with Ruby (noob confusion)](https://www.ruby-forum.com/t/getting-started-with-ruby-noob-confusion/115275)

<div class="topic-metadata">

**Author:** [@sabotage](https://www.ruby-forum.com/u/sabotage)\
**Replies:** 15\
**Last updated:** [September 26, 2007, 6:17pm UTC](https://www.ruby-forum.com/t/getting-started-with-ruby-noob-confusion/115275 "2007-09-26T18:17:54Z")

</div>

Hi everyone! As the title suggests, I’m new to Ruby (and programming in general), and am feeling a bit overwhelmed by the complexities. (However, I must say that Ruby is one of the few languages I’d dare to describe…

---

## [I am new to Ruby and I could use some expert advice as to ho](https://www.ruby-forum.com/t/i-am-new-to-ruby-and-i-could-use-some-expert-advice-as-to-ho/115141)

<div class="topic-metadata">

**Author:** [@rubymarc](https://www.ruby-forum.com/u/rubymarc)\
**Replies:** 47\
**Last updated:** [September 26, 2007, 6:14pm UTC](https://www.ruby-forum.com/t/i-am-new-to-ruby-and-i-could-use-some-expert-advice-as-to-ho/115141 "2007-09-26T18:14:21Z")

</div>

I am new to Ruby and I could use some expert advice as to how I can make this code run faster. def scramble(fname) f = File.new(fname, “rb”) \_fname = fname + “.scrambled” begin File.exist?(\_fname) if File.delete(\_f…

---

## [Mechanize problem](https://www.ruby-forum.com/t/mechanize-problem/115357)

<div class="topic-metadata">

**Author:** [@jarvo88](https://www.ruby-forum.com/u/jarvo88)\
**Replies:** 3\
**Last updated:** [September 26, 2007, 6:10pm UTC](https://www.ruby-forum.com/t/mechanize-problem/115357 "2007-09-26T18:10:15Z")

</div>

Ok guys, ignore the ugly code. i just want this to work before i build it up. So it is very ugly and well, all round bad… But i’ll work on that after. I am using WWW::Mechanize and i’m trying to do a challenge (that i …

---

## [Refactorings again: idea for library](https://www.ruby-forum.com/t/refactorings-again-idea-for-library/115582)

<div class="topic-metadata">

**Author:** [@Victor\_SZverokSS\_Sh](https://www.ruby-forum.com/u/Victor_SZverokSS_Sh)\
**Replies:** 2\
**Last updated:** [September 26, 2007, 4:42pm UTC](https://www.ruby-forum.com/t/refactorings-again-idea-for-library/115582 "2007-09-26T16:42:49Z")

</div>

Hi all. Here’s an idea stolen from \[1\] and \[2\]. Suppose we have a library. Suppose we’ve done some refactorings in it (method or class renamed, class splitted into several, or joined, or…) The task: change all client…

---

## [How to parse a unicode url?](https://www.ruby-forum.com/t/how-to-parse-a-unicode-url/115036)

<div class="topic-metadata">

**Author:** [@dandante](https://www.ruby-forum.com/u/dandante)\
**Replies:** 7\
**Last updated:** [September 26, 2007, 4:34pm UTC](https://www.ruby-forum.com/t/how-to-parse-a-unicode-url/115036 "2007-09-26T16:34:02Z")

</div>

I would really like to be able to do the following. Is this even possible? Thanks, nerdytenor uri = URI.parse(‘http://www.hÃ¶ren.com’) # not a real url (that I know of) URI::InvalidURIError: bad URI(is not URI?): h…

---

## [Test if file is binary?](https://www.ruby-forum.com/t/test-if-file-is-binary/112595)

<div class="topic-metadata">

**Author:** [@RebhanS\_Gilbert](https://www.ruby-forum.com/u/RebhanS_Gilbert)\
**Replies:** 23\
**Last updated:** [September 26, 2007, 4:11pm UTC](https://www.ruby-forum.com/t/test-if-file-is-binary/112595 "2007-09-26T16:11:48Z")

</div>

Hi , how to test if a file is binary or not ? There ain’t something like File.binary = NoMethodError: undefined method \`binary?’ for File:Class Any ideas or libraries available ? Regards, Gilbert

---

## [Spliting input at blank line](https://www.ruby-forum.com/t/spliting-input-at-blank-line/115472)

<div class="topic-metadata">

**Author:** [@arfon](https://www.ruby-forum.com/u/arfon)\
**Replies:** 3\
**Last updated:** [September 26, 2007, 2:59pm UTC](https://www.ruby-forum.com/t/spliting-input-at-blank-line/115472 "2007-09-26T14:59:49Z")

</div>

I’m trying to read in a file with blocks of text separated by blank lines. How do I go about spliting the input file using the blank lines as delimiters? For example I havea file containing the following: \[1\] Lorem …

---

## [IntegreMatrix](https://www.ruby-forum.com/t/integrematrix/115571)

<div class="topic-metadata">

**Author:** [@jngo](https://www.ruby-forum.com/u/jngo)\
**Replies:** 0\
**Last updated:** [September 26, 2007, 1:50pm UTC](https://www.ruby-forum.com/t/integrematrix/115571 "2007-09-26T13:50:45Z")

</div>

Hello All, I have put together some code (using a book as a guide!!) to create an integer matrix as follows: class IntegerMatrix def initialize(rows,cols) @rows, @cols = rows, cols @data = (0…rows).map{(0…cols).map…

---

## [Concatenate a set of files](https://www.ruby-forum.com/t/concatenate-a-set-of-files/115543)

<div class="topic-metadata">

**Author:** [@eggie5](https://www.ruby-forum.com/u/eggie5)\
**Replies:** 10\
**Last updated:** [September 26, 2007, 1:13pm UTC](https://www.ruby-forum.com/t/concatenate-a-set-of-files/115543 "2007-09-26T13:13:42Z")

</div>

Given a set of files: 01\_file 02\_file 03\_file … What’s the best way to concatenate their respective text into one file ‘file\_set’. The must be loaded in alphabetical order as they are listed above. Any ideas?

---

## [Problem using log4r Configurator object](https://www.ruby-forum.com/t/problem-using-log4r-configurator-object/115565)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [September 26, 2007, 11:35am UTC](https://www.ruby-forum.com/t/problem-using-log4r-configurator-object/115565 "2007-09-26T11:35:50Z")

</div>

Hi anyone, I’m new to ruby and I’ve a question about log4r and its Configurator object. I read the manual, really short, and tried some samples. I would like to try to use the Configurator object and so I tried to put …

---

## [How to use Enumerable](https://www.ruby-forum.com/t/how-to-use-enumerable/115500)

<div class="topic-metadata">

**Author:** [@kule](https://www.ruby-forum.com/u/kule)\
**Replies:** 2\
**Last updated:** [September 26, 2007, 10:35am UTC](https://www.ruby-forum.com/t/how-to-use-enumerable/115500 "2007-09-26T10:35:16Z")

</div>

Hi, Really need a little help understanding how to implement Enumerable - maybe I’m thinking about this the wrong way - what I’d like to do is: sm = ScoreMatrix.new sm.keywords \<\< Keyword.new(1) sm.keywords \<\< Keywo…

---

## [Retfilter0.6 releases](https://www.ruby-forum.com/t/retfilter0-6-releases/115563)

<div class="topic-metadata">

**Author:** [@flatekmonkey](https://www.ruby-forum.com/u/flatekmonkey)\
**Replies:** 0\
**Last updated:** [September 26, 2007, 10:04am UTC](https://www.ruby-forum.com/t/retfilter0-6-releases/115563 "2007-09-26T10:04:59Z")

</div>

Hi folks this is to announce the first public release of Retfilter, a DSL interface to iptable commands. Although this code is used in production be warned please if you want to use it, it is badly documented and the…

---

## [Merge two arrays into a hash](https://www.ruby-forum.com/t/merge-two-arrays-into-a-hash/115560)

<div class="topic-metadata">

**Author:** [@jandot](https://www.ruby-forum.com/u/jandot)\
**Replies:** 11\
**Last updated:** [September 26, 2007, 9:57am UTC](https://www.ruby-forum.com/t/merge-two-arrays-into-a-hash/115560 "2007-09-26T09:57:21Z")

</div>

Hi all, I have looked at some of the answers in the forum, but they do not seem to fit. I want to merge two array into a hash like so: key = \[ “1”, “2”, “3”\] value = \[ “a”, “b” \] into: myhash = {‘1’ =\> ‘a’ , ‘2’ =\> …

---

## [Error on ruby readline](https://www.ruby-forum.com/t/error-on-ruby-readline/115562)

<div class="topic-metadata">

**Author:** [@shinwoo](https://www.ruby-forum.com/u/shinwoo)\
**Replies:** 0\
**Last updated:** [September 26, 2007, 9:23am UTC](https://www.ruby-forum.com/t/error-on-ruby-readline/115562 "2007-09-26T09:23:48Z")

</div>

Hi, I just compile ruby readline ext for ruby 1.8.6-p110 now. However, when I run irb and include ‘ruby/completion’ all my special character is not recognize by irb, like ‘Home’ become ‘$’, arrow ‘\<-’ become ‘%’ and …

---

## ["Programming Ruby", when to expect P11?](https://www.ruby-forum.com/t/programming-ruby-when-to-expect-p11/115542)

<div class="topic-metadata">

**Author:** [@mcampbell](https://www.ruby-forum.com/u/mcampbell)\
**Replies:** 6\
**Last updated:** [September 26, 2007, 8:55am UTC](https://www.ruby-forum.com/t/programming-ruby-when-to-expect-p11/115542 "2007-09-26T08:55:49Z")

</div>

It’s been a year since the last printing and I’ve noticed a lot of errata has gathered up since then, it seems like it’s high time for P11. I want to go through the book once again, but if P11 is imminent, I’d rather …

---

## [Ruby regex on html file](https://www.ruby-forum.com/t/ruby-regex-on-html-file/115535)

<div class="topic-metadata">

**Author:** [@eggie5](https://www.ruby-forum.com/u/eggie5)\
**Replies:** 11\
**Last updated:** [September 26, 2007, 7:55am UTC](https://www.ruby-forum.com/t/ruby-regex-on-html-file/115535 "2007-09-26T07:55:58Z")

</div>

I’m trying to write a rake task to extract all the script tags out of my html file and save them to an array. How can I do this? Below is a snippet form my file management.rhtml, I would like to get paths to the scrip…

---

## [\[ANN\] Rassmalog 6.0.0](https://www.ruby-forum.com/t/ann-rassmalog-6-0-0/115554)

<div class="topic-metadata">

**Author:** [@snk](https://www.ruby-forum.com/u/snk)\
**Replies:** 0\
**Last updated:** [September 26, 2007, 7:09am UTC](https://www.ruby-forum.com/t/ann-rassmalog-6-0-0/115554 "2007-09-26T07:09:49Z")

</div>

Rassmalog A static blog engine based on YAML, eRuby, and Rake. It transforms blog entries written in Textile or other formatting systems into valid XHTML files that you can view on your computer or upload to your web…

---

## [Running shell scripts](https://www.ruby-forum.com/t/running-shell-scripts/115539)

<div class="topic-metadata">

**Author:** [@eggie5](https://www.ruby-forum.com/u/eggie5)\
**Replies:** 7\
**Last updated:** [September 26, 2007, 6:03am UTC](https://www.ruby-forum.com/t/running-shell-scripts/115539 "2007-09-26T06:03:46Z")

</div>

How can I run this command from my ruby script? /usr/bin/java -jar #{jsmin\_path}/custom\_rhino.jar -c #{tmp\_path}\_uncompressed.js

---

## [Wrong File::SEPARATOR?](https://www.ruby-forum.com/t/wrong-file-separator/114781)

<div class="topic-metadata">

**Author:** [@ronaldfischer](https://www.ruby-forum.com/u/ronaldfischer)\
**Replies:** 11\
**Last updated:** [September 26, 2007, 5:54am UTC](https://www.ruby-forum.com/t/wrong-file-separator/114781 "2007-09-26T05:54:59Z")

</div>

On my Ruby 1.8.5 under Windows, I have: C:\> ruby -e 'puts File::SEPARATOR' / Shouldn’t it output ‘’ instead? Ronald

---

## [Shirt Reader (#140)](https://www.ruby-forum.com/t/shirt-reader-140/115191)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 3\
**Last updated:** [September 26, 2007, 5:04am UTC](https://www.ruby-forum.com/t/shirt-reader-140/115191 "2007-09-26T05:04:09Z")

</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: …

---

## [Reading a pipe by multiple threads](https://www.ruby-forum.com/t/reading-a-pipe-by-multiple-threads/115540)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [September 26, 2007, 3:19am UTC](https://www.ruby-forum.com/t/reading-a-pipe-by-multiple-threads/115540 "2007-09-26T03:19:27Z")

</div>

e$B0J2\<$N%W%m%0%i%\`$,e(B ^C e$B$G;\_$^$j$^$;$s!#e(B % ./ruby -ve ’ r, w = IO.pipe t1 = Thread.new { p \[1, r.sysread(10)\] } t2 = Thread.new { p \[2, r.sysread(10)\] } sleep 1 w.write “a” sleep 1 w.write “a” ’ ruby …

---

## [Replacing diacritics by simple character](https://www.ruby-forum.com/t/replacing-diacritics-by-simple-character/115486)

<div class="topic-metadata">

**Author:** [@Une\_BSSSSvS\_ue](https://www.ruby-forum.com/u/Une_BSSSSvS_ue)\
**Replies:** 10\
**Last updated:** [September 26, 2007, 2:58am UTC](https://www.ruby-forum.com/t/replacing-diacritics-by-simple-character/115486 "2007-09-26T02:58:24Z")

</div>

do u know of a way to replace diacritics by simple character (ie. : é -o-\> e) the same with ligatures (ie. : Æ -o-\> AE ) using tables ?

---

## [Django code sprint](https://www.ruby-forum.com/t/django-code-sprint/115258)

<div class="topic-metadata">

**Author:** [@Bil\_K](https://www.ruby-forum.com/u/Bil_K)\
**Replies:** 6\
**Last updated:** [September 26, 2007, 2:32am UTC](https://www.ruby-forum.com/t/django-code-sprint/115258 "2007-09-26T02:32:40Z")

</div>

Hi, Just ran across this, http://google-code-updates.blogspot.com/2007/09/updates-from-django-sprint.html More than 200 people around the world devoted their time and brainpower to improving the Django Web framework …

---

## [Using a block to configure/initialize a class](https://www.ruby-forum.com/t/using-a-block-to-configure-initialize-a-class/115527)

<div class="topic-metadata">

**Author:** [@emmanueloga](https://www.ruby-forum.com/u/emmanueloga)\
**Replies:** 5\
**Last updated:** [September 26, 2007, 2:12am UTC](https://www.ruby-forum.com/t/using-a-block-to-configure-initialize-a-class/115527 "2007-09-26T02:12:12Z")

</div>

Hi! i need a solution for this, it’s pretty simple but i can’t get it to work… suppose: class Options def self.define\_an\_option # …don’t-know-how-implementation :frowning: end define\_an\_option :option1, String de…

---

## [Setting up TclTkAquaBI and Ruby on OS X](https://www.ruby-forum.com/t/setting-up-tcltkaquabi-and-ruby-on-os-x/115526)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [September 26, 2007, 12:07am UTC](https://www.ruby-forum.com/t/setting-up-tcltkaquabi-and-ruby-on-os-x/115526 "2007-09-26T00:07:15Z")

</div>

Hi, I’ve been stuck trying to get this to work for days. Not sure how to get this to work. Any help would be very much appreciated. I’m running OS X 10.4.10 and I installed the latest TclTkAquaBI (8.4.10) using the …

---

## [\[ANN\] How to spy on the Japanese Rubists](https://www.ruby-forum.com/t/ann-how-to-spy-on-the-japanese-rubists/66814)

<div class="topic-metadata">

**Author:** [@nicwilliams](https://www.ruby-forum.com/u/nicwilliams)\
**Replies:** 48\
**Last updated:** [September 25, 2007, 11:35pm UTC](https://www.ruby-forum.com/t/ann-how-to-spy-on-the-japanese-rubists/66814 "2007-09-25T23:35:40Z")

</div>

"Their Ruby code is surrounded by a shrouded of Japanese symbols. You know there is gold in there, but its left to the reader to interpret the purpose of the article. Happy Japanese man? Cranky Japanese man? "The crea…

---

## [Detecting duplicates in an array, anything in the standard l](https://www.ruby-forum.com/t/detecting-duplicates-in-an-array-anything-in-the-standard-l/112457)

<div class="topic-metadata">

**Author:** [@thbar](https://www.ruby-forum.com/u/thbar)\
**Replies:** 34\
**Last updated:** [September 25, 2007, 11:20pm UTC](https://www.ruby-forum.com/t/detecting-duplicates-in-an-array-anything-in-the-standard-l/112457 "2007-09-25T23:20:51Z")

</div>

Hi! Just wondering if there is something simple already built in the std library to remove duplicates from an array (or an enumerable). I’ve seen and used various approaches, like: module Enumerable def dups inject…

---

## [Checking if a string matches a regexp - am I missing somethi](https://www.ruby-forum.com/t/checking-if-a-string-matches-a-regexp-am-i-missing-somethi/82446)

<div class="topic-metadata">

**Author:** [@rsanheim](https://www.ruby-forum.com/u/rsanheim)\
**Replies:** 10\
**Last updated:** [September 25, 2007, 11:19pm UTC](https://www.ruby-forum.com/t/checking-if-a-string-matches-a-regexp-am-i-missing-somethi/82446 "2007-09-25T23:19:26Z")

</div>

I figure that I must be missing something really obvious with this question. But here goes: I want to know if a string matches a regular expression. I don’t care where the match begins, I don’t want a matchdata obje…

---

## [A Heartfelt Plea for a Universal Open Source Package Managem](https://www.ruby-forum.com/t/a-heartfelt-plea-for-a-universal-open-source-package-managem/82453)

<div class="topic-metadata">

**Author:** [@MSEdward\_SEdS\_Bora](https://www.ruby-forum.com/u/MSEdward_SEdS_Bora)\
**Replies:** 17\
**Last updated:** [September 25, 2007, 11:19pm UTC](https://www.ruby-forum.com/t/a-heartfelt-plea-for-a-universal-open-source-package-managem/82453 "2007-09-25T23:19:24Z")

</div>

Paulus E. wrote: and “suggests” dependencies. (after all, apt is probably the mother of FWIW, I’d much appreciate adding such a notion to gem. Paulus Which brings up a very interesting question/comment/pet peeve of…

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

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