# Ruby

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

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

---

## [String of strings](https://www.ruby-forum.com/t/string-of-strings/79960)

<div class="topic-metadata">

**Author:** [@Josselin](https://www.ruby-forum.com/u/Josselin)\
**Replies:** 4\
**Last updated:** [December 20, 2006, 7:24pm UTC](https://www.ruby-forum.com/t/string-of-strings/79960 "2006-12-20T19:24:54Z")

</div>

I got an array of id’s : ids = \[22443, 22468, 22371, 22218, 22472, 22377, 22245\] I would like to get a string of strings (to be used in SQL WHERE…IN clause " ‘22443’ , ’ 22468’ , ’ 22371’ , ’ 22218’ , ‘22472’ , ‘2237…

---

## [Simple copy of attributes](https://www.ruby-forum.com/t/simple-copy-of-attributes/79771)

<div class="topic-metadata">

**Author:** [@gnuvince](https://www.ruby-forum.com/u/gnuvince)\
**Replies:** 3\
**Last updated:** [December 20, 2006, 7:24pm UTC](https://www.ruby-forum.com/t/simple-copy-of-attributes/79771 "2006-12-20T19:24:53Z")

</div>

Hello ! I’ve just stumbled upon code where you have different classes with no relations, and that you want to copy some attributes from one to the other. So I came up with this: def copy\_attributes(dest, src, \*attrs) …

---

## [WIN32OLE -- missing sub-object members](https://www.ruby-forum.com/t/win32ole-missing-sub-object-members/79977)

<div class="topic-metadata">

**Author:** [@djlewis](https://www.ruby-forum.com/u/djlewis)\
**Replies:** 0\
**Last updated:** [December 20, 2006, 7:24pm UTC](https://www.ruby-forum.com/t/win32ole-missing-sub-object-members/79977 "2006-12-20T19:24:53Z")

</div>

I’m trying to connect to this set of Windows Scripting objects… http://www.dbpoweramp.com/developer-scripting-dmc.htm It seems to go OK for dMCScripting.Converter, but the other subobjects come up empty – they are the…

---

## [Ruby2ruby 1.1.2 Released](https://www.ruby-forum.com/t/ruby2ruby-1-1-2-released/79974)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [December 20, 2006, 7:22pm UTC](https://www.ruby-forum.com/t/ruby2ruby-1-1-2-released/79974 "2006-12-20T19:22:50Z")

</div>

ruby2ruby version 1.1.2 has been released! http://seattlerb.rubyforge.org/ http://rubyforge.org/projects/seattlerb ruby2ruby provides a means of generating pure ruby code easily from ParseTree’s Sexps. This makes mak…

---

## [Hpricot and Regular expression](https://www.ruby-forum.com/t/hpricot-and-regular-expression/79806)

<div class="topic-metadata">

**Author:** [@dhanasekara](https://www.ruby-forum.com/u/dhanasekara)\
**Replies:** 3\
**Last updated:** [December 20, 2006, 7:22pm UTC](https://www.ruby-forum.com/t/hpricot-and-regular-expression/79806 "2006-12-20T19:22:49Z")

</div>

Hi All, I have a html fragment like the following Toon Zone News1 Toon Zone News2 Toon Zone News3 Toon Zone News3 I want to match only the first three anchor tags, I dont want to get the last one since the href f …

---

## [Madison Ruby Group Jan meeting 1/22/07 - Web Framework Compa](https://www.ruby-forum.com/t/madison-ruby-group-jan-meeting-1-22-07-web-framework-compa/79973)

<div class="topic-metadata">

**Author:** [@rsanheim](https://www.ruby-forum.com/u/rsanheim)\
**Replies:** 0\
**Last updated:** [December 20, 2006, 7:22pm UTC](https://www.ruby-forum.com/t/madison-ruby-group-jan-meeting-1-22-07-web-framework-compa/79973 "2006-12-20T19:22:48Z")

</div>

Hi! I’m pleased to announce the January meeting for the Madison, WI Ruby on Rails group. Scott Fradkin will be presenting Monday, 1/22/07 on “Web D. Framework Comparisons” - comparing a demo app in Rails, Groovy/Gra…

---

## [TkCanvas on windows seems slow](https://www.ruby-forum.com/t/tkcanvas-on-windows-seems-slow/78985)

<div class="topic-metadata">

**Author:** [@Joel\_VanderWerf](https://www.ruby-forum.com/u/Joel_VanderWerf)\
**Replies:** 2\
**Last updated:** [December 20, 2006, 7:20pm UTC](https://www.ruby-forum.com/t/tkcanvas-on-windows-seems-slow/78985 "2006-12-20T19:20:44Z")

</div>

Hi, all, On linux, I developed a little Tk animation using TkCanvas, and then I ran it on windows. It’s much slower on windows than on linux (maybe, 5fps versus 30fps). Same machine, but ruby-1.8.4 on linux, 1.8.5 on …

---

## [Odd Problem with Command Line Args](https://www.ruby-forum.com/t/odd-problem-with-command-line-args/79832)

<div class="topic-metadata">

**Author:** [@combas](https://www.ruby-forum.com/u/combas)\
**Replies:** 2\
**Last updated:** [December 20, 2006, 7:20pm UTC](https://www.ruby-forum.com/t/odd-problem-with-command-line-args/79832 "2006-12-20T19:20:44Z")

</div>

For some reason when using command line arguments to specify input files, whenever I use ‘gets’ it seems to be reading from the argument files instead of STDIN. My code is something like this (simplified): emp\_file …

---

## [Heckle 1.1.0 Released](https://www.ruby-forum.com/t/heckle-1-1-0-released/79970)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [December 20, 2006, 7:20pm UTC](https://www.ruby-forum.com/t/heckle-1-1-0-released/79970 "2006-12-20T19:20:43Z")

</div>

Heckle version 1.1.0 has been released! http://www.rubyforge.org/projects/seattlerb by Ryan D. and Kevin C. Unit Testing Sadism. From http://glu.ttono.us/articles/2006/12/19/tormenting-your-tests- with-heckle : Hec…

---

## [ParseTree 1.6.2 Released](https://www.ruby-forum.com/t/parsetree-1-6-2-released/79969)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [December 20, 2006, 7:18pm UTC](https://www.ruby-forum.com/t/parsetree-1-6-2-released/79969 "2006-12-20T19:18:41Z")

</div>

ParseTree version 1.6.2 has been released! zenspider projects | software projects | by ryan davis ParseTree is a C extension (using RubyInline) that extracts the parse tree for an entire class or a specific method and…

---

## [Division hangs irb](https://www.ruby-forum.com/t/division-hangs-irb/79953)

<div class="topic-metadata">

**Author:** [@Ashley\_M](https://www.ruby-forum.com/u/Ashley_M)\
**Replies:** 2\
**Last updated:** [December 20, 2006, 7:18pm UTC](https://www.ruby-forum.com/t/division-hangs-irb/79953 "2006-12-20T19:18:37Z")

</div>

Anyone know why the first three of these calculations works on my irb (on intel OS X 10.4.8), but the last one silently hangs? (DateTime.now - Date.new(2006,9,15)).to\_f / 30 =\> 3.18572031018981 (DateTime.now - Da…

---

## [Extending PDF::Writer](https://www.ruby-forum.com/t/extending-pdf-writer/79763)

<div class="topic-metadata">

**Author:** [@bill\_walton](https://www.ruby-forum.com/u/bill_walton)\
**Replies:** 2\
**Last updated:** [December 20, 2006, 7:18pm UTC](https://www.ruby-forum.com/t/extending-pdf-writer/79763 "2006-12-20T19:18:37Z")

</div>

I need to extend PDF::Writer to allow it to include an external XML file into the PDF file. It looks pretty straight forward from the PDF spec in that it will be seperate component of the file, distinct from the PDF …

---

## [Net::Ldap question](https://www.ruby-forum.com/t/net-ldap-question/79258)

<div class="topic-metadata">

**Author:** [@Eduardo\_YSSSSSSSSez](https://www.ruby-forum.com/u/Eduardo_YSSSSSSSSez)\
**Replies:** 10\
**Last updated:** [December 20, 2006, 7:16pm UTC](https://www.ruby-forum.com/t/net-ldap-question/79258 "2006-12-20T19:16:36Z")

</div>

Hello, I’m trying this plugin in a rails app and think I need some help. What I want to do is authenticate some user, I don’t need to do any queries or search in LDAP. I have this method: def self.initialize\_ldap\_co…

---

## [DRYing a loop](https://www.ruby-forum.com/t/drying-a-loop/79935)

<div class="topic-metadata">

**Author:** [@Josselin](https://www.ruby-forum.com/u/Josselin)\
**Replies:** 2\
**Last updated:** [December 20, 2006, 7:16pm UTC](https://www.ruby-forum.com/t/drying-a-loop/79935 "2006-12-20T19:16:35Z")

</div>

I wrote that the newbie way, but is there any way to DRY it ? closed\_cities = \[\] 0.step(9, 1) do |i| closed\_cities \<\< City.find\_by\_id( city\_25 \[i\] \[0\] ) i = i.next end if yes, is it only for fun , or does it …

---

## [Re: what exactly does obj.is\_a? do?](https://www.ruby-forum.com/t/re-what-exactly-does-obj-is-a-do/79921)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 1\
**Last updated:** [December 20, 2006, 7:16pm UTC](https://www.ruby-forum.com/t/re-what-exactly-does-obj-is-a-do/79921 "2006-12-20T19:16:34Z")

</div>

From: Jon G. \[mailto:removed\_email\_address@domain.invalid\] To clarify, I’m interested in how, not if, is\_a? determines whether @my\_obj.is\_a?(Klass) with no concern for superclasses or modules. I’m fairly confident…

---

## [Re: Audio conversion in Windows, FLAC to MP3, etc](https://www.ruby-forum.com/t/re-audio-conversion-in-windows-flac-to-mp3-etc/79964)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [December 20, 2006, 7:14pm UTC](https://www.ruby-forum.com/t/re-audio-conversion-in-windows-flac-to-mp3-etc/79964 "2006-12-20T19:14:28Z")

</div>

Dear David, I don’t know of anyrthing particular Rubyish, but otherwise, there is Sox (Sound exchange), which has a Windows binary and tar files you could compile under Mingw or Cygwin, if you like \_SoX - Sound eXch…

---

## [Ruby gotchas](https://www.ruby-forum.com/t/ruby-gotchas/79965)

<div class="topic-metadata">

**Author:** [@bowenmark](https://www.ruby-forum.com/u/bowenmark)\
**Replies:** 0\
**Last updated:** [December 20, 2006, 7:14pm UTC](https://www.ruby-forum.com/t/ruby-gotchas/79965 "2006-12-20T19:14:26Z")

</div>

I’ve written up some ruby gotchas that have come up while using ruby. I’m wondering if there are any other gotchas that I should be aware of. The list is available at: I was considering adding &&= to the list as it’s…

---

## [Re: Please help fixing gems on OSX](https://www.ruby-forum.com/t/re-please-help-fixing-gems-on-osx/79963)

<div class="topic-metadata">

**Author:** [@Dan\_Uznanski](https://www.ruby-forum.com/u/Dan_Uznanski)\
**Replies:** 0\
**Last updated:** [December 20, 2006, 7:14pm UTC](https://www.ruby-forum.com/t/re-please-help-fixing-gems-on-osx/79963 "2006-12-20T19:14:26Z")

</div>

Over the past few months, several people have posted on various mailing lists, including this one, that their rubygems install on OSX fails with the following error: /usr/local/lib/ruby/site\_ruby/1.8/rubygems/cmd\_mana…

---

## [ZenTest 3.4.3 Released](https://www.ruby-forum.com/t/zentest-3-4-3-released/79962)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [December 20, 2006, 7:14pm UTC](https://www.ruby-forum.com/t/zentest-3-4-3-released/79962 "2006-12-20T19:14:22Z")

</div>

ZenTest version 3.4.3 has been released! zentest | software projects | by ryan davis ZenTest provides 4 different tools and 1 library: zentest, unit\_diff, autotest, multiruby, and Test::Rails. ZenTest scans your targ…

---

## [Ruby 1.8.5-p11 preview](https://www.ruby-forum.com/t/ruby-1-8-5-p11-preview/79695)

<div class="topic-metadata">

**Author:** [@Urabe\_S](https://www.ruby-forum.com/u/Urabe_S)\
**Replies:** 7\
**Last updated:** [December 20, 2006, 7:10pm UTC](https://www.ruby-forum.com/t/ruby-1-8-5-p11-preview/79695 "2006-12-20T19:10:18Z")

</div>

Hi, After the latest 1.8.5-p2 release (which was a security fix), we have backported several patches from ruby\_1\_8 branch and now 1.8.5 has patchlevel of 11. I think this Christmas is a good day to release them. Th…

---

## [Kernel#select docs broken?](https://www.ruby-forum.com/t/kernel-select-docs-broken/79936)

<div class="topic-metadata">

**Author:** [@msoulier](https://www.ruby-forum.com/u/msoulier)\
**Replies:** 1\
**Last updated:** [December 20, 2006, 7:10pm UTC](https://www.ruby-forum.com/t/kernel-select-docs-broken/79936 "2006-12-20T19:10:16Z")

</div>

I’m trying to find out how to use Kernel#select or IO#select. Unfortunately, the online docs aren’t very helpful. The entry for IO#select tells me to see Kernel#select, which links to the same spot. http://www.ruby-do…

---

## [CVS freeze](https://www.ruby-forum.com/t/cvs-freeze/79952)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 0\
**Last updated:** [December 20, 2006, 7:10pm UTC](https://www.ruby-forum.com/t/cvs-freeze/79952 "2006-12-20T19:10:15Z")

</div>

Hi, To Ruby committers: From now, I’ll convert to CVS repository to Subversion repository. So don’t touch CVS repository any more. I’ll send announcement that conversion is finished and how to use with svn repositor…

---

## [Using gems on Windows without dependencies](https://www.ruby-forum.com/t/using-gems-on-windows-without-dependencies/79951)

<div class="topic-metadata">

**Author:** [@robertjames](https://www.ruby-forum.com/u/robertjames)\
**Replies:** 0\
**Last updated:** [December 20, 2006, 7:10pm UTC](https://www.ruby-forum.com/t/using-gems-on-windows-without-dependencies/79951 "2006-12-20T19:10:14Z")

</div>

gem install GEMNAME -f seems to fail on Windows. That is, if you say no to the dependency, it will refuse to install. How can I install a gem without its dependnecy? (railsmachine depends on mongrel\_cluster which de…

---

## [Re: where have all the experienced users gone?](https://www.ruby-forum.com/t/re-where-have-all-the-experienced-users-gone/79948)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 0\
**Last updated:** [December 20, 2006, 7:08pm UTC](https://www.ruby-forum.com/t/re-where-have-all-the-experienced-users-gone/79948 "2006-12-20T19:08:13Z")

</div>

From: removed\_email\_address@domain.invalid \[mailto:removed\_email\_address@domain.invalid\] is it me, or are others also thinking that a thread complaining about experienced users evaporating that also aims to reduce new…

---

## [How to expect eof with expect+pty](https://www.ruby-forum.com/t/how-to-expect-eof-with-expect-pty/79947)

<div class="topic-metadata">

**Author:** [@simonsaid](https://www.ruby-forum.com/u/simonsaid)\
**Replies:** 1\
**Last updated:** [December 20, 2006, 7:08pm UTC](https://www.ruby-forum.com/t/how-to-expect-eof-with-expect-pty/79947 "2006-12-20T19:08:11Z")

</div>

using gnupg to encrypt a file with only a passphrase. prompt\> echo ‘hello world’ \>\> test prompt\> gpg -c test Enter passphrase: Repeat passphrase: prompt\> note: I have not shown the many backspaces. however if ther…

---

## [Problem with string comparison](https://www.ruby-forum.com/t/problem-with-string-comparison/79834)

<div class="topic-metadata">

**Author:** [@chell](https://www.ruby-forum.com/u/chell)\
**Replies:** 3\
**Last updated:** [December 20, 2006, 7:08pm UTC](https://www.ruby-forum.com/t/problem-with-string-comparison/79834 "2006-12-20T19:08:11Z")

</div>

Hi! The following code: name = gets.comp.to\_s if name == “Bill” or name == “Steve” puts “Wow, you’re pretty smart!” end yields this error, once executed: NoMethodError: undefined method â€˜compâ€™ for “Bill”:Strin…

---

## [EXCEL Ruby not working](https://www.ruby-forum.com/t/excel-ruby-not-working/79498)

<div class="topic-metadata">

**Author:** [@anon1m0us](https://www.ruby-forum.com/u/anon1m0us)\
**Replies:** 8\
**Last updated:** [December 20, 2006, 7:06pm UTC](https://www.ruby-forum.com/t/excel-ruby-not-working/79498 "2006-12-20T19:06:10Z")

</div>

I get a file name in the directory and modify the cells with making bold etc. when excel.visible=TRUE it works. However, when excel.visible=FALSE nothing happens. Why? newdir=Dir.getwd x=1 excel = WIN32OLE::new(“e…

---

## [Returning to point in file](https://www.ruby-forum.com/t/returning-to-point-in-file/102623)

<div class="topic-metadata">

**Author:** [@jspencer78](https://www.ruby-forum.com/u/jspencer78)\
**Replies:** 1\
**Last updated:** [December 20, 2006, 6:52pm UTC](https://www.ruby-forum.com/t/returning-to-point-in-file/102623 "2006-12-20T18:52:05Z")

</div>

Hello, I am opening a file and reading from it. I need to leave the file and then return to the position that i finished reading at. OK, so i can get the exact position in bytes using pipe.pos However when i return t…

---

## [FAM-Ruby 0.2.0](https://www.ruby-forum.com/t/fam-ruby-0-2-0/79940)

<div class="topic-metadata">

**Author:** [@dangermoose](https://www.ruby-forum.com/u/dangermoose)\
**Replies:** 0\
**Last updated:** [December 20, 2006, 6:41pm UTC](https://www.ruby-forum.com/t/fam-ruby-0-2-0/79940 "2006-12-20T18:41:59Z")

</div>

Hi everyone. I just released version 0.2.0 of FAM-Ruby, my Ruby bindings for FAM (http://oss.sgi.com/projects/fam/). FAM (File Alteration Monitor) is a cross-platform API that allows applications to monitor specific …

---

## [Re: Chess960 (#106)](https://www.ruby-forum.com/t/re-chess960-106/79939)

<div class="topic-metadata">

**Author:** [@davidtl](https://www.ruby-forum.com/u/davidtl)\
**Replies:** 0\
**Last updated:** [December 20, 2006, 6:41pm UTC](https://www.ruby-forum.com/t/re-chess960-106/79939 "2006-12-20T18:41:58Z")

</div>

My solution: =begin sum (elemIndices ‘B’ position) mod 2 /= 0 where r1:r2:\_ = elemIndices ‘R’ position k = fromJust $ elemIndex ‘K’ position results = filter restriction (permutation pieces) =end def perm…

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

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