# Ruby

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

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

---

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

<div class="topic-metadata">

**Author:** [@harper](https://www.ruby-forum.com/u/harper)\
**Replies:** 1\
**Last updated:** [August 26, 2007, 4:25pm UTC](https://www.ruby-forum.com/t/string/113025 "2007-08-26T16:25:52Z")

</div>

this may be a slightly unrelated question, but i was hoping someone had some small quick answer for me … does anyone know how to modify / change existing text in a db? with the code @foods = Food.find(:all) food\_row…

---

## [ANN: Sequel 0.1.9.12 Released](https://www.ruby-forum.com/t/ann-sequel-0-1-9-12-released/113031)

<div class="topic-metadata">

**Author:** [@ciconia](https://www.ruby-forum.com/u/ciconia)\
**Replies:** 0\
**Last updated:** [August 26, 2007, 3:23pm UTC](https://www.ruby-forum.com/t/ann-sequel-0-1-9-12-released/113031 "2007-08-26T15:23:46Z")

</div>

Sequel 0.1.9.12 has just been released. This release includes a few fixes for working with Model.set\_schema, courtesy of Rick O… This release also adds a few more specs (we’re now at 96.2% code coverage!) Sequel is a …

---

## [String#tr - Problem in Code or Documentation?](https://www.ruby-forum.com/t/string-tr-problem-in-code-or-documentation/113026)

<div class="topic-metadata">

**Author:** [@wonado](https://www.ruby-forum.com/u/wonado)\
**Replies:** 4\
**Last updated:** [August 26, 2007, 1:08pm UTC](https://www.ruby-forum.com/t/string-tr-problem-in-code-or-documentation/113026 "2007-08-26T13:08:26Z")

</div>

Moin, moin! The description for “tr” does not state what should happen, if the second string ist an empty string. In the actual implementation all character from the object string will be deleted, if they appear in th…

---

## [Re: ruby-ldap and paged results on windows](https://www.ruby-forum.com/t/re-ruby-ldap-and-paged-results-on-windows/112725)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [August 26, 2007, 11:39am UTC](https://www.ruby-forum.com/t/re-ruby-ldap-and-paged-results-on-windows/112725 "2007-08-26T11:39:14Z")

</div>

On 8/21/07, Dave K. \<dave / davewking.com\> wrote: Hi- I’m trying to get paged results to work with ruby-ldap against Active Directory in Windows. I compiled ruby-ldap 0.9.7 following the directions on http://www.…

---

## [Ruby access to Win Forms application](https://www.ruby-forum.com/t/ruby-access-to-win-forms-application/113010)

<div class="topic-metadata">

**Author:** [@bigjimmyk3](https://www.ruby-forum.com/u/bigjimmyk3)\
**Replies:** 5\
**Last updated:** [August 26, 2007, 11:29am UTC](https://www.ruby-forum.com/t/ruby-access-to-win-forms-application/113010 "2007-08-26T11:29:39Z")

</div>

I am a QA Engineer implementing a Ruby-based test framework to test the applications in my organization…the issue I have is about 20% of what we do is Windows Forms (.NET) applications…can I use Win32OLE for this, or …

---

## [Excel mashup](https://www.ruby-forum.com/t/excel-mashup/112769)

<div class="topic-metadata">

**Author:** [@dnstevenson](https://www.ruby-forum.com/u/dnstevenson)\
**Replies:** 3\
**Last updated:** [August 26, 2007, 9:38am UTC](https://www.ruby-forum.com/t/excel-mashup/112769 "2007-08-26T09:38:04Z")

</div>

I’m using parseexcel (http://raa.ruby-lang.org/project/parseexcel/) to read some excel files from a website after manually downloading them. I’d like to avoid the download and read them directly off the web but can’t …

---

## [Ruby on the rise in Brazil](https://www.ruby-forum.com/t/ruby-on-the-rise-in-brazil/112861)

<div class="topic-metadata">

**Author:** [@zoat](https://www.ruby-forum.com/u/zoat)\
**Replies:** 3\
**Last updated:** [August 26, 2007, 7:21am UTC](https://www.ruby-forum.com/t/ruby-on-the-rise-in-brazil/112861 "2007-08-26T07:21:57Z")

</div>

Developers in Brazil expect their use of the Ruby scripting language to double in the next year, according to an Evans Data Corp. survey of 400 developers in Brazil, China, India and Eastern Europe. Although roughly 1…

---

## [Neural network library?](https://www.ruby-forum.com/t/neural-network-library/113003)

<div class="topic-metadata">

**Author:** [@reynar](https://www.ruby-forum.com/u/reynar)\
**Replies:** 0\
**Last updated:** [August 25, 2007, 10:51pm UTC](https://www.ruby-forum.com/t/neural-network-library/113003 "2007-08-25T22:51:21Z")

</div>

Hi, I’ve been looking for a neural network library to work within a ruby (rails) project. I have come across FANN FANN - FANN which claims to have ruby bindings but the relevant page is no longer available. Is anyon…

---

## [Accessor\_writer methods and instance\_eval](https://www.ruby-forum.com/t/accessor-writer-methods-and-instance-eval/112875)

<div class="topic-metadata">

**Author:** [@Thomas\_Gantner](https://www.ruby-forum.com/u/Thomas_Gantner)\
**Replies:** 3\
**Last updated:** [August 25, 2007, 10:42pm UTC](https://www.ruby-forum.com/t/accessor-writer-methods-and-instance-eval/112875 "2007-08-25T22:42:18Z")

</div>

Hi I stumbled upon a problem with ‘instance\_eval’ (using ruby 1.8.5 on linux-x86\_64). Simplified code example: irb:01\> S = Struct.new(:a) =\> S irb:02\> s = S.new(1) =\> # irb:03\> s.a =\> 1 irb:04\> s.a = 2 =\> 2 ir…

---

## [Combinations of numbers/operators?](https://www.ruby-forum.com/t/combinations-of-numbers-operators/112893)

<div class="topic-metadata">

**Author:** [@don](https://www.ruby-forum.com/u/don)\
**Replies:** 6\
**Last updated:** [August 25, 2007, 10:36pm UTC](https://www.ruby-forum.com/t/combinations-of-numbers-operators/112893 "2007-08-25T22:36:16Z")

</div>

This is a really easy one but I’m kind of a kook and new to programming so any help is appreciated. Let’s say I have an array consisting of 4 integers i.e. 1,2,3,4. I would like to print every combination of these num…

---

## [Logging object](https://www.ruby-forum.com/t/logging-object/112967)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 6\
**Last updated:** [August 25, 2007, 6:49pm UTC](https://www.ruby-forum.com/t/logging-object/112967 "2007-08-25T18:49:38Z")

</div>

Hi, Can anyone suggest the best way to pass a Logger object around between all the classes in an application? Currently I have it set in a constant in the top-level but I don’t feel that this is the best way to do it…

---

## [Rb\_enc\_mbclen](https://www.ruby-forum.com/t/rb-enc-mbclen/112984)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 5\
**Last updated:** [August 25, 2007, 6:10pm UTC](https://www.ruby-forum.com/t/rb-enc-mbclen/112984 "2007-08-25T18:10:39Z")

</div>

rb\_enc\_mbclen e$B$N%$%s%?!\<%U%’!\<%9$Oe(B GB18030 e$B$J$I$G:$$k$s$8$ce(B e$B$J$$$G$7$g$&$+!#e(B rb\_enc\_mbclen e$B$K$O%a%b%jFb$N3+;O0LCV$OM?$($i$l$^$9$,!"=\*C\<0Le(B e$BCV$OM?$($i$l$^$;$s!#$=$N$?$a!“FI$s$G$O$$$1$J$$$H$3$m…

---

## [Test/ruby/](https://www.ruby-forum.com/t/test-ruby/112994)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 1\
**Last updated:** [August 25, 2007, 6:02pm UTC](https://www.ruby-forum.com/t/test-ruby/112994 "2007-08-25T18:02:38Z")

</div>

e$B!!$5$5$@$G$9!%e(B e$B!!$?$V$se(B m17n e$B$N1F6A$@$H;W$$$^$9$,!$e(Btest/ruby/test\_file.rb e$B$r\<B9T$9e(B e$B$k$H!$$J$s$+;\_$^$j$^$9!%860x$ODI$C$F$$$^$;$s!%e(B $ make ruby test-all TESTS=’-v ruby/test\_file’ make: \`…

---

## [Where are the MediaCloth people?](https://www.ruby-forum.com/t/where-are-the-mediacloth-people/112985)

<div class="topic-metadata">

**Author:** [@thiagoalessio](https://www.ruby-forum.com/u/thiagoalessio)\
**Replies:** 0\
**Last updated:** [August 25, 2007, 2:13pm UTC](https://www.ruby-forum.com/t/where-are-the-mediacloth-people/112985 "2007-08-25T14:13:20Z")

</div>

Ruby people, I have some patches in hand and have been trying to find the maintainers of MediaCloth, but was not yet able to contact them. Does anyone know where can I find them? Thanks, Thiago A.

---

## [A simple question regarding ruby method argument](https://www.ruby-forum.com/t/a-simple-question-regarding-ruby-method-argument/88788)

<div class="topic-metadata">

**Author:** [@shinwoo](https://www.ruby-forum.com/u/shinwoo)\
**Replies:** 13\
**Last updated:** [August 25, 2007, 1:36pm UTC](https://www.ruby-forum.com/t/a-simple-question-regarding-ruby-method-argument/88788 "2007-08-25T13:36:15Z")

</div>

Hi, I am new to ruby and am learning it now. Can anyone point me how to pass argument to method by reference? I mean that the methods/function able to change the value of the argument. I am running windows using win32…

---

## [Rewriting an URL route in Ruby](https://www.ruby-forum.com/t/rewriting-an-url-route-in-ruby/112982)

<div class="topic-metadata">

**Author:** [@Josselin](https://www.ruby-forum.com/u/Josselin)\
**Replies:** 0\
**Last updated:** [August 25, 2007, 12:45pm UTC](https://www.ruby-forum.com/t/rewriting-an-url-route-in-ruby/112982 "2007-08-25T12:45:58Z")

</div>

right now I am using an an helper action like that def document\_pagination\_links\_remote(paginator) page\_options = {:window\_size =\> 1} pagination\_links\_each(paginator, page\_options) do |n| options = { :url =\> franchi…

---

## [Ungetc](https://www.ruby-forum.com/t/ungetc/112981)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [August 25, 2007, 11:33am UTC](https://www.ruby-forum.com/t/ungetc/112981 "2007-08-25T11:33:50Z")

</div>

e$B$^$:$O!"0J2\<$N$h$&$K$9$k$He(B core e$B$rEG$-$^$9!#e(B % ./ruby -ve ‘10000.times { STDIN.ungetc “a” }’ ruby 1.9.0 (2007-08-25 patchlevel 0) \[i686-linux\] \*\*\* glibc detected \*\*\* free(): invalid next size (normal): 0x0…

---

## [Beginning a variable name with a number](https://www.ruby-forum.com/t/beginning-a-variable-name-with-a-number/112959)

<div class="topic-metadata">

**Author:** [@eggie5](https://www.ruby-forum.com/u/eggie5)\
**Replies:** 3\
**Last updated:** [August 25, 2007, 10:24am UTC](https://www.ruby-forum.com/t/beginning-a-variable-name-with-a-number/112959 "2007-08-25T10:24:46Z")

</div>

I have a symbol that I need to name with a number as the first character, but that’s invalid ruby syntax. e.g.: t.column :\_3g2, :integer How can I somehow escape the ‘3’ so I don’t have the use the ‘\_’ in the variabl…

---

## [Logging](https://www.ruby-forum.com/t/logging/112870)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 2\
**Last updated:** [August 25, 2007, 10:18am UTC](https://www.ruby-forum.com/t/logging/112870 "2007-08-25T10:18:45Z")

</div>

Hi All, Could anyone tell me how I could syslog to a specific log (e.g. /var/ log/daemon.log, /var/log/syslog.log…)? Thanks in advance! -Greg

---

## [Add outside variable to array elements](https://www.ruby-forum.com/t/add-outside-variable-to-array-elements/112776)

<div class="topic-metadata">

**Author:** [@not\_pol\_pot](https://www.ruby-forum.com/u/not_pol_pot)\
**Replies:** 7\
**Last updated:** [August 25, 2007, 9:41am UTC](https://www.ruby-forum.com/t/add-outside-variable-to-array-elements/112776 "2007-08-25T09:41:42Z")

</div>

Hi, I have all of six hours of programming experience, so I hope that youâ€™ll bear with me. Ain’t all that comfortable with terminology and such. I opened a binary file called â€œ16bytesâ€ and read it into a stri…

---

## [Writing to Binary Files](https://www.ruby-forum.com/t/writing-to-binary-files/112669)

<div class="topic-metadata">

**Author:** [@doug\_meyer](https://www.ruby-forum.com/u/doug_meyer)\
**Replies:** 11\
**Last updated:** [August 25, 2007, 8:15am UTC](https://www.ruby-forum.com/t/writing-to-binary-files/112669 "2007-08-25T08:15:35Z")

</div>

I’m having some serious issues writing to a binary file. Can anyone give me a hand? And could I be having this problem because I’m trying to do this on a Linux machine? Thanks!

---

## [Fast check if files exist](https://www.ruby-forum.com/t/fast-check-if-files-exist/112948)

<div class="topic-metadata">

**Author:** [@eggie5](https://www.ruby-forum.com/u/eggie5)\
**Replies:** 2\
**Last updated:** [August 24, 2007, 11:32pm UTC](https://www.ruby-forum.com/t/fast-check-if-files-exist/112948 "2007-08-24T23:32:38Z")

</div>

I have list (array) of file names in the form: 5\_4.3g2 5\_5.3gp 5\_6.3gp . . . What’s the fastest way I can check if these files exist in a given directory?

---

## [Re: Fast check if files exist](https://www.ruby-forum.com/t/re-fast-check-if-files-exist/112951)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 1\
**Last updated:** [August 24, 2007, 11:30pm UTC](https://www.ruby-forum.com/t/re-fast-check-if-files-exist/112951 "2007-08-24T23:30:38Z")

</div>

From: eggie5 \[mailto:removed\_email\_address@domain.invalid\] I have list (array) of file names in the form: What’s the fastest way I can check if these files exist in a given directory? Dir.chdir( source\_directory ) …

---

## [Selecting indices from an array](https://www.ruby-forum.com/t/selecting-indices-from-an-array/112803)

<div class="topic-metadata">

**Author:** [@ronaldfischer](https://www.ruby-forum.com/u/ronaldfischer)\
**Replies:** 7\
**Last updated:** [August 24, 2007, 10:21pm UTC](https://www.ruby-forum.com/t/selecting-indices-from-an-array/112803 "2007-08-24T22:21:14Z")

</div>

For an array a, I would like to know all the indices i where a\[i\] fulfils some condition. My solution (which works) looks like this: a=%w(Deutschlandsberg Stainz Preding Eibiswald) (0…a.size).select {|i| a\[i\]=~/g$/} …

---

## [How to check for an error if executing a shell command e.g](https://www.ruby-forum.com/t/how-to-check-for-an-error-if-executing-a-shell-command-e-g/112944)

<div class="topic-metadata">

**Author:** [@kazaam](https://www.ruby-forum.com/u/kazaam)\
**Replies:** 4\
**Last updated:** [August 24, 2007, 10:11pm UTC](https://www.ruby-forum.com/t/how-to-check-for-an-error-if-executing-a-shell-command-e-g/112944 "2007-08-24T22:11:10Z")

</div>

Hi, I’m writing a little script to install some drivers but I wanna react in this script if any step fails. So e.g. I’m doing this: system(‘dpkg -i xorg-driver-fglrx fglrx-kernel-source’) How can I check if this was …

---

## [Problems getting Mechanize working](https://www.ruby-forum.com/t/problems-getting-mechanize-working/112856)

<div class="topic-metadata">

**Author:** [@spacechurro](https://www.ruby-forum.com/u/spacechurro)\
**Replies:** 4\
**Last updated:** [August 24, 2007, 9:55pm UTC](https://www.ruby-forum.com/t/problems-getting-mechanize-working/112856 "2007-08-24T21:55:28Z")

</div>

i am trying to get mechanize to work, but i am getting the following error… does anyone have any ideas? this happens in irb and while running scripts… if i do an agent.methods, i get not ‘get’ in the list either… ve…

---

## [Hoedown rough cuts finished. Confreaks to record Rubyconf](https://www.ruby-forum.com/t/hoedown-rough-cuts-finished-confreaks-to-record-rubyconf/112864)

<div class="topic-metadata">

**Author:** [@doncarlosx](https://www.ruby-forum.com/u/doncarlosx)\
**Replies:** 1\
**Last updated:** [August 24, 2007, 6:44pm UTC](https://www.ruby-forum.com/t/hoedown-rough-cuts-finished-confreaks-to-record-rubyconf/112864 "2007-08-24T18:44:27Z")

</div>

Confreaks would like to announce that we uploaded the last of the rough cuts from the Ruby Hoedown on Monday. We look forward to continued enhancements to these, including searchable transcripts, in the near future. …

---

## [Unsubscribe](https://www.ruby-forum.com/t/unsubscribe/112934)

<div class="topic-metadata">

**Author:** [@3nd3r](https://www.ruby-forum.com/u/3nd3r)\
**Replies:** 0\
**Last updated:** [August 24, 2007, 5:21pm UTC](https://www.ruby-forum.com/t/unsubscribe/112934 "2007-08-24T17:21:14Z")

</div>

unsubscribe

---

## [Ldap injection](https://www.ruby-forum.com/t/ldap-injection/112882)

<div class="topic-metadata">

**Author:** [@sprsquish](https://www.ruby-forum.com/u/sprsquish)\
**Replies:** 3\
**Last updated:** [August 24, 2007, 5:08pm UTC](https://www.ruby-forum.com/t/ldap-injection/112882 "2007-08-24T17:08:13Z")

</div>

Any issues / advice guarding against ldap injection when doing a simple pass/fail ldap auth using Net::LDAP#auth and #bind for client-supplied uid and pss? (Francis et al, …, Thanks for all the great work on ruby-net-…

---

## [Something I just found out, am sharing (:newbish)](https://www.ruby-forum.com/t/something-i-just-found-out-am-sharing-newbish/112889)

<div class="topic-metadata">

**Author:** [@simonsaid](https://www.ruby-forum.com/u/simonsaid)\
**Replies:** 12\
**Last updated:** [August 24, 2007, 4:55pm UTC](https://www.ruby-forum.com/t/something-i-just-found-out-am-sharing-newbish/112889 "2007-08-24T16:55:10Z")

</div>

075:0\> a = “hello” “hello” 076:0\> a += " there." “hello there.” 077:0\> neat!

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

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