# Ruby

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

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

---

## [Questions about reimplementing core classes](https://www.ruby-forum.com/t/questions-about-reimplementing-core-classes/104434)

<div class="topic-metadata">

**Author:** [@BallS\_Donald\_A\_Jr\_S](https://www.ruby-forum.com/u/BallS_Donald_A_Jr_S)\
**Replies:** 7\
**Last updated:** [May 18, 2007, 5:07pm UTC](https://www.ruby-forum.com/t/questions-about-reimplementing-core-classes/104434 "2007-05-18T17:07:34Z")

</div>

I had reason to need a sorted map recently and thought it might be a useful exercise to write it as a complete drop-in replacement for Hash, backed by a sorted array. An hour or so later: http://pastie.caboo.se/62458 …

---

## [Why does Array#first not use rb\_ary\_subseq?](https://www.ruby-forum.com/t/why-does-array-first-not-use-rb-ary-subseq/104476)

<div class="topic-metadata">

**Author:** [@apeiros](https://www.ruby-forum.com/u/apeiros)\
**Replies:** 5\
**Last updated:** [May 18, 2007, 4:22pm UTC](https://www.ruby-forum.com/t/why-does-array-first-not-use-rb-ary-subseq/104476 "2007-05-18T16:22:09Z")

</div>

Hi there When I run a small bench I noticed that Array#first(n) with an argument is vastly slower than Array#\[0,n\]. Poking a bit in the source revealed that Array#\[\] uses rb\_ary\_subseq, which seems to create a COW Ar…

---

## [Question for those developing GUI apps with Ruby](https://www.ruby-forum.com/t/question-for-those-developing-gui-apps-with-ruby/104407)

<div class="topic-metadata">

**Author:** [@Karl\_von\_Laudermann](https://www.ruby-forum.com/u/Karl_von_Laudermann)\
**Replies:** 4\
**Last updated:** [May 18, 2007, 4:13pm UTC](https://www.ruby-forum.com/t/question-for-those-developing-gui-apps-with-ruby/104407 "2007-05-18T16:13:29Z")

</div>

This is a question for those of you who use Ruby to develop GUI-based applications, using wxWidgets, or Qt, or GTK, etc. and the appropriate Ruby bindings. My question is, how do you actually package and distribute yo…

---

## [Thinking about Ruby](https://www.ruby-forum.com/t/thinking-about-ruby/104053)

<div class="topic-metadata">

**Author:** [@noble](https://www.ruby-forum.com/u/noble)\
**Replies:** 10\
**Last updated:** [May 18, 2007, 4:09pm UTC](https://www.ruby-forum.com/t/thinking-about-ruby/104053 "2007-05-18T16:09:28Z")

</div>

I am thinking about looking into Ruby and also RoR. Right now I develop on Windows and I use C# and Asp.Net. I also know some PHP, VB, and Java. I have done a little research on Ruby and actually downloaded it on Wind…

---

## [Coopting String interpolation](https://www.ruby-forum.com/t/coopting-string-interpolation/104363)

<div class="topic-metadata">

**Author:** [@aurelianito](https://www.ruby-forum.com/u/aurelianito)\
**Replies:** 17\
**Last updated:** [May 18, 2007, 3:56pm UTC](https://www.ruby-forum.com/t/coopting-string-interpolation/104363 "2007-05-18T15:56:27Z")

</div>

We all know the #{} operator for String interpolation. It’s used like this: name=“Aure” greeting=“hi, #{name}” and greeting evaluates to “hi, Aure”. But I would like to change it. Is there a pure Ruby way to force “…

---

## [Seeking C# references about Ruby Code block functionality](https://www.ruby-forum.com/t/seeking-c-references-about-ruby-code-block-functionality/104410)

<div class="topic-metadata">

**Author:** [@dkmd\_nielsen](https://www.ruby-forum.com/u/dkmd_nielsen)\
**Replies:** 3\
**Last updated:** [May 18, 2007, 3:06pm UTC](https://www.ruby-forum.com/t/seeking-c-references-about-ruby-code-block-functionality/104410 "2007-05-18T15:06:21Z")

</div>

I have two rather simple class methods coded in Ruby…my own each iterator: Loop through each instruction in the block, yielding the result from the specified code block. def each(&logic) @instructions.each {|instr| y…

---

## [How to stop the ML sending my mails back to me?](https://www.ruby-forum.com/t/how-to-stop-the-ml-sending-my-mails-back-to-me/103888)

<div class="topic-metadata">

**Author:** [@fcruxen](https://www.ruby-forum.com/u/fcruxen)\
**Replies:** 8\
**Last updated:** [May 18, 2007, 3:00pm UTC](https://www.ruby-forum.com/t/how-to-stop-the-ml-sending-my-mails-back-to-me/103888 "2007-05-18T15:00:18Z")

</div>

I don’t want to receive the messages I send, it screws my Gmail display. I have searched everywhere for a way to do that with no luck. I even tried to send a message to ruby-talk-ctl with the #msg command, but I got n…

---

## [Rspec + Oracle](https://www.ruby-forum.com/t/rspec-oracle/121797)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [May 18, 2007, 1:51pm UTC](https://www.ruby-forum.com/t/rspec-oracle/121797 "2007-05-18T13:51:06Z")

</div>

Hi all. Does anybody use Rspec with Oracle? I have RoR app + Oracle DB. I use Rspec 0.9.4. I have installed Rspec plugin and generated spec for model Country. If I use “@countries = Country.new” in my spec I get “Ar…

---

## [Solid IPTC Library?](https://www.ruby-forum.com/t/solid-iptc-library/104343)

<div class="topic-metadata">

**Author:** [@sams](https://www.ruby-forum.com/u/sams)\
**Replies:** 2\
**Last updated:** [May 18, 2007, 1:24pm UTC](https://www.ruby-forum.com/t/solid-iptc-library/104343 "2007-05-18T13:24:09Z")

</div>

Anyone know of a really solid IPTC Library with Ruby bindings? Ideally it would also handle encoding to extended characters to UTF-8 properly.

---

## [Net::LDAP vs ruby/ldap](https://www.ruby-forum.com/t/net-ldap-vs-ruby-ldap/93120)

<div class="topic-metadata">

**Author:** [@dacat](https://www.ruby-forum.com/u/dacat)\
**Replies:** 4\
**Last updated:** [May 18, 2007, 12:30pm UTC](https://www.ruby-forum.com/t/net-ldap-vs-ruby-ldap/93120 "2007-05-18T12:30:57Z")

</div>

The basic premise of this test was to see how long it would take to do the following: 1000 Basic lookups on a known attribute/value pair over an unencrypted connection using anonymous bind for each library. This post…

---

## [Bug in Dir.glob in 1.8.6 on Windows?](https://www.ruby-forum.com/t/bug-in-dir-glob-in-1-8-6-on-windows/104425)

<div class="topic-metadata">

**Author:** [@tlockney](https://www.ruby-forum.com/u/tlockney)\
**Replies:** 4\
**Last updated:** [May 18, 2007, 11:50am UTC](https://www.ruby-forum.com/t/bug-in-dir-glob-in-1-8-6-on-windows/104425 "2007-05-18T11:50:54Z")

</div>

Hi, I got a bug report for webgen which appeared when the user change from ruby 1.8.5 to 1.8.6 using the One-Click-Ruby-Installer. Following is an extract from an IRB session under Windows with ruby 1.8.6: irb(main):…

---

## [Relocatable ruby distribution](https://www.ruby-forum.com/t/relocatable-ruby-distribution/103036)

<div class="topic-metadata">

**Author:** [@fkc\_email-news\_S\_ya](https://www.ruby-forum.com/u/fkc_email-news_S_ya)\
**Replies:** 10\
**Last updated:** [May 18, 2007, 11:00am UTC](https://www.ruby-forum.com/t/relocatable-ruby-distribution/103036 "2007-05-18T11:00:50Z")

</div>

Hi All: I’ve convinced the java project to allow ruby (yay!), and now we want to include and control the ruby dist, libraries and gems and all in svn. Since the project can be checked out anywhere I want to be able …

---

## [Damerau-Levenshtein\_distance](https://www.ruby-forum.com/t/damerau-levenshtein-distance/104449)

<div class="topic-metadata">

**Author:** [@jeremy](https://www.ruby-forum.com/u/jeremy)\
**Replies:** 2\
**Last updated:** [May 18, 2007, 10:42am UTC](https://www.ruby-forum.com/t/damerau-levenshtein-distance/104449 "2007-05-18T10:42:49Z")

</div>

I wrote the method below by copying the algorithm from Damerau–Levenshtein distance - Wikipedia (and matrix is a really simple 2d array implementation). But the problem is that it slows wat down as the string size get…

---

## [What's the most common library for Ruby image processing?](https://www.ruby-forum.com/t/whats-the-most-common-library-for-ruby-image-processing/104236)

<div class="topic-metadata">

**Author:** [@anakintang](https://www.ruby-forum.com/u/anakintang)\
**Replies:** 7\
**Last updated:** [May 18, 2007, 9:15am UTC](https://www.ruby-forum.com/t/whats-the-most-common-library-for-ruby-image-processing/104236 "2007-05-18T09:15:24Z")

</div>

All, what’s the most common library for Ruby image processing? What I want to do is just compare two images based on pixels. Thanks

---

## [RubyConf 2007](https://www.ruby-forum.com/t/rubyconf-2007/103071)

<div class="topic-metadata">

**Author:** [@David\_ASBlack](https://www.ruby-forum.com/u/David_ASBlack)\
**Replies:** 19\
**Last updated:** [May 18, 2007, 8:33am UTC](https://www.ruby-forum.com/t/rubyconf-2007/103071 "2007-05-18T08:33:22Z")

</div>

Hi everyone – On behalf of Ruby Central, Inc., I’m very happy to announce the seventh International Ruby Conference: RubyConf 2007 November 2-4, 2007 Omni Charlotte Hotel Ch…

---

## [Addin lines to existing csv file with fastercsv](https://www.ruby-forum.com/t/addin-lines-to-existing-csv-file-with-fastercsv/104445)

<div class="topic-metadata">

**Author:** [@mslagell](https://www.ruby-forum.com/u/mslagell)\
**Replies:** 2\
**Last updated:** [May 18, 2007, 7:10am UTC](https://www.ruby-forum.com/t/addin-lines-to-existing-csv-file-with-fastercsv/104445 "2007-05-18T07:10:17Z")

</div>

I’am trying to add new lines to a existing csv file, but i only get one line. It doesn’t add additional lines, i pasted te code below, has anyone a suggestion how to write new lines? require ‘fastercsv’ FasterCSV.op…

---

## [Memory-mapped persistent hash?](https://www.ruby-forum.com/t/memory-mapped-persistent-hash/104370)

<div class="topic-metadata">

**Author:** [@kelleysislander](https://www.ruby-forum.com/u/kelleysislander)\
**Replies:** 13\
**Last updated:** [May 18, 2007, 7:03am UTC](https://www.ruby-forum.com/t/memory-mapped-persistent-hash/104370 "2007-05-18T07:03:16Z")

</div>

Hi, Essentially I’m looking for something that acts like a ruby Hash, is nearly as fast as a ruby Hash, but is persistent. It should also be able to remember gigabytes of information on disk, while not using a ton o…

---

## [Multiple Select Dropdown and Storing Problem](https://www.ruby-forum.com/t/multiple-select-dropdown-and-storing-problem/104440)

<div class="topic-metadata">

**Author:** [@jim](https://www.ruby-forum.com/u/jim)\
**Replies:** 2\
**Last updated:** [May 18, 2007, 7:02am UTC](https://www.ruby-forum.com/t/multiple-select-dropdown-and-storing-problem/104440 "2007-05-18T07:02:16Z")

</div>

I was working on this a couple of months back and could not figure out what I was doing wrong. I came back to it today and wanted to post again to see if any of you had an idea. Here is the problem. I have this cod…

---

## [In\_groups\_of undefined method](https://www.ruby-forum.com/t/in-groups-of-undefined-method/104429)

<div class="topic-metadata">

**Author:** [@mex23](https://www.ruby-forum.com/u/mex23)\
**Replies:** 3\
**Last updated:** [May 18, 2007, 2:43am UTC](https://www.ruby-forum.com/t/in-groups-of-undefined-method/104429 "2007-05-18T02:43:58Z")

</div>

Hi guys, I’m newbie of ruby and I tried to use the method in\_groups\_of(x, false) in irb i wrote: irb(main):001:0\> a = (1…12).to\_a =\> \[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12\] irb(main):002:0\> a.in\_groups\_of(4) NoMeth…

---

## [Jig 0.1.0 Released](https://www.ruby-forum.com/t/jig-0-1-0-released/104446)

<div class="topic-metadata">

**Author:** [@pfharlock](https://www.ruby-forum.com/u/pfharlock)\
**Replies:** 0\
**Last updated:** [May 18, 2007, 1:35am UTC](https://www.ruby-forum.com/t/jig-0-1-0-released/104446 "2007-05-18T01:35:53Z")

</div>

Jig version 0.1.0 has been released. http://www.rubyforge.org/projects/jig A jig is a data structure designed to facilitate construction and manipulation of strings with an inherent hierarchical syntax. The idea is …

---

## [Streams of bits](https://www.ruby-forum.com/t/streams-of-bits/104395)

<div class="topic-metadata">

**Author:** [@richardfairhurst](https://www.ruby-forum.com/u/richardfairhurst)\
**Replies:** 4\
**Last updated:** [May 17, 2007, 9:16pm UTC](https://www.ruby-forum.com/t/streams-of-bits/104395 "2007-05-17T21:16:21Z")

</div>

Hi, I’m writing a bit of Ruby to output SWF files. SWF’s opcodes and arguments are variable-length streams of bits. They’re packed in direct succession - i.e. not usually padded to byte boundaries. So, for example, …

---

## [Looking for general Ruby tips and tricks](https://www.ruby-forum.com/t/looking-for-general-ruby-tips-and-tricks/104416)

<div class="topic-metadata">

**Author:** [@mschwab](https://www.ruby-forum.com/u/mschwab)\
**Replies:** 1\
**Last updated:** [May 17, 2007, 7:13pm UTC](https://www.ruby-forum.com/t/looking-for-general-ruby-tips-and-tricks/104416 "2007-05-17T19:13:25Z")

</div>

Are there some good websites with lists of Ruby tips and tricks (the kind of stuff I’d never find out about on my own)? Or maybe some kind of archive for this newsgroup? Mike S.

---

## [How to determine if a string is printable?](https://www.ruby-forum.com/t/how-to-determine-if-a-string-is-printable/104261)

<div class="topic-metadata">

**Author:** [@mschwab](https://www.ruby-forum.com/u/mschwab)\
**Replies:** 7\
**Last updated:** [May 17, 2007, 5:39pm UTC](https://www.ruby-forum.com/t/how-to-determine-if-a-string-is-printable/104261 "2007-05-17T17:39:58Z")

</div>

Is there an easy way to test if a string is printable (doesn’t contain control characters)? Something easier than listing out all the letters, numbers, and punctuation and checking each character. Mike S.

---

## [Fxruby on cygwin...so close](https://www.ruby-forum.com/t/fxruby-on-cygwin-so-close/104406)

<div class="topic-metadata">

**Author:** [@bwv549](https://www.ruby-forum.com/u/bwv549)\
**Replies:** 1\
**Last updated:** [May 17, 2007, 5:26pm UTC](https://www.ruby-forum.com/t/fxruby-on-cygwin-so-close/104406 "2007-05-17T17:26:56Z")

</div>

So, after some trial and error I got the fox toolkit to compile under cygwin using these configuration options: ./configure --without-xcursor --disable-shared --without-xrandr make && make install I install fxruby wit…

---

## [Problem removing new line characters on Mac OS X](https://www.ruby-forum.com/t/problem-removing-new-line-characters-on-mac-os-x/104374)

<div class="topic-metadata">

**Author:** [@Singeo](https://www.ruby-forum.com/u/Singeo)\
**Replies:** 17\
**Last updated:** [May 17, 2007, 5:19pm UTC](https://www.ruby-forum.com/t/problem-removing-new-line-characters-on-mac-os-x/104374 "2007-05-17T17:19:55Z")

</div>

Hi, I’m pretty new to Ruby. I’ve got a text file where I need to remove some new line characters. I’ve tried everything I can think of to do this with no success, including: line.gsub!("/r","") line.gsub!("/n","") l…

---

## [Tk/Tile](https://www.ruby-forum.com/t/tk-tile/104376)

<div class="topic-metadata">

**Author:** [@Wim\_Vander\_S](https://www.ruby-forum.com/u/Wim_Vander_S)\
**Replies:** 1\
**Last updated:** [May 17, 2007, 3:39pm UTC](https://www.ruby-forum.com/t/tk-tile/104376 "2007-05-17T15:39:45Z")

</div>

Hi, where can I get tk and tile for ruby if they didn’t come with my ruby installation? I don’t want to install another ruby, so is there a way to get them without doing that? I run on Mac OS and I installed ruby thr…

---

## [Documatic: reports for Ruby](https://www.ruby-forum.com/t/documatic-reports-for-ruby/124553)

<div class="topic-metadata">

**Author:** [@urbanus](https://www.ruby-forum.com/u/urbanus)\
**Replies:** 0\
**Last updated:** [May 17, 2007, 3:35pm UTC](https://www.ruby-forum.com/t/documatic-reports-for-ruby/124553 "2007-05-17T15:35:24Z")

</div>

A new reporting and document production tool has been released for Ruby called “Documatic”. Documatic is an OpenDocument processor for Ruby. It can be used to produce attractive printable documents such as database re…

---

## [Self in blocks](https://www.ruby-forum.com/t/self-in-blocks/103851)

<div class="topic-metadata">

**Author:** [@vascoas](https://www.ruby-forum.com/u/vascoas)\
**Replies:** 17\
**Last updated:** [May 17, 2007, 3:34pm UTC](https://www.ruby-forum.com/t/self-in-blocks/103851 "2007-05-17T15:34:23Z")

</div>

Hi This seems to me somehow inconsistent: class A; end 1) output A A.class\_eval { puts self } 2) output main (in irb) \[1\].each { puts self } The “problem” to me is that in 1) ‘self’ seems to refer to the context wh…

---

## [RegExp problem](https://www.ruby-forum.com/t/regexp-problem/104392)

<div class="topic-metadata">

**Author:** [@Charlie\_S](https://www.ruby-forum.com/u/Charlie_S)\
**Replies:** 2\
**Last updated:** [May 17, 2007, 2:57pm UTC](https://www.ruby-forum.com/t/regexp-problem/104392 "2007-05-17T14:57:19Z")

</div>

I need to match a block of text as follows Discard all lines which begin with // Capture all lines in between as single strings So // section 1 bit bit more // section 2 more stuff // section 3 and yet more Sh…

---

## [Thread-safe ANSI-C ruby needed to replace lua](https://www.ruby-forum.com/t/thread-safe-ansi-c-ruby-needed-to-replace-lua/104233)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 7\
**Last updated:** [May 17, 2007, 2:02pm UTC](https://www.ruby-forum.com/t/thread-safe-ansi-c-ruby-needed-to-replace-lua/104233 "2007-05-17T14:02:08Z")

</div>

My software development generally consists of: C++ : high-performance code – rendering, physics, complex computations, system API calls (e.g. Direct3D) lua : in-application scripting ruby : outside-application scr…

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

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