# Ruby

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

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

---

## [Cannot return negative value?](https://www.ruby-forum.com/t/cannot-return-negative-value/82344)

<div class="topic-metadata">

**Author:** [@Josselin](https://www.ruby-forum.com/u/Josselin)\
**Replies:** 7\
**Last updated:** [September 25, 2007, 10:37pm UTC](https://www.ruby-forum.com/t/cannot-return-negative-value/82344 "2007-09-25T22:37:46Z")

</div>

I got the following error : parse error, unexpected tUMINUS\_NUM userCredential.flagged? ? return -1 : return 1 what’s wrong ? I tried also userCredential.flagged? ? return (-1) : return 1 same problem…

---

## [Check performance with Benchmark](https://www.ruby-forum.com/t/check-performance-with-benchmark/82521)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 10:37pm UTC](https://www.ruby-forum.com/t/check-performance-with-benchmark/82521 "2007-09-25T22:37:23Z")

</div>

Hi all, I know I can use this format to check the performance of my sctipt: result= Benchmark.measure{##script included here##} But this code will look ugly if the script spans many lines.I wonder 1) if there is a …

---

## [Codegolf: Pascal's Triangle](https://www.ruby-forum.com/t/codegolf-pascals-triangle/83362)

<div class="topic-metadata">

**Author:** [@dfg59](https://www.ruby-forum.com/u/dfg59)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 10:37pm UTC](https://www.ruby-forum.com/t/codegolf-pascals-triangle/83362 "2007-09-25T22:37:16Z")

</div>

Hi all! I’ve been quite addicted to www.codegolf.com for a while and I’m trying to skim down my Pascal’s Triangle program. The challenge description is here: http://codegolf.com/pascals-triangle. I’m currently at 84 b…

---

## [Ruby 2.0 joint Ruby/Perl/Python backend?](https://www.ruby-forum.com/t/ruby-2-0-joint-ruby-perl-python-backend/82243)

<div class="topic-metadata">

**Author:** [@surf](https://www.ruby-forum.com/u/surf)\
**Replies:** 9\
**Last updated:** [September 25, 2007, 10:36pm UTC](https://www.ruby-forum.com/t/ruby-2-0-joint-ruby-perl-python-backend/82243 "2007-09-25T22:36:50Z")

</div>

At the back of the Nutshell book it mentions a possibilty of a joint backend of Ruby/Perl/Python. Anyone ever heard much on that ? The really cool thing about that would be that might be that if you could get access t…

---

## [Parsing data trouble](https://www.ruby-forum.com/t/parsing-data-trouble/82411)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 10:33pm UTC](https://www.ruby-forum.com/t/parsing-data-trouble/82411 "2007-09-25T22:33:55Z")

</div>

Late in the day and I’ve hit a wall. Any help is appreciated. Heres what I have: \<% dbh = DBI.connect(“dbi:blank:dbname=products;host=blank;blank”,“blank”,“blank”) sth = dbh.execute(“SELECT \* FROM products”) while …

---

## [Regular expression: Is this a bug or feature?](https://www.ruby-forum.com/t/regular-expression-is-this-a-bug-or-feature/83044)

<div class="topic-metadata">

**Author:** [@mkrauskopf](https://www.ruby-forum.com/u/mkrauskopf)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 10:33pm UTC](https://www.ruby-forum.com/t/regular-expression-is-this-a-bug-or-feature/83044 "2007-09-25T22:33:40Z")

</div>

Hi ruby experts! Is this intended behaviour? irb(main):001:0\> s1=‘a=1’ =\> “a=1” irb(main):002:0\> s2=‘b=1’ =\> “b=1” irb(main):003:0\> s1 =~ /a|b=(.)/ =\> 0 \<------ expression matches irb…

---

## [Hi-res Matz's photo](https://www.ruby-forum.com/t/hi-res-matzs-photo/82481)

<div class="topic-metadata">

**Author:** [@threeeyedfish](https://www.ruby-forum.com/u/threeeyedfish)\
**Replies:** 11\
**Last updated:** [September 25, 2007, 10:33pm UTC](https://www.ruby-forum.com/t/hi-res-matzs-photo/82481 "2007-09-25T22:33:14Z")

</div>

Does anyone know where can I get a high resolution Matz’s photo (To have 300 dpi for A4) to print it and put it on the wall? Your sincerely, Damian/Three-eyed Fish

---

## [Is the RubyForge web server down?](https://www.ruby-forum.com/t/is-the-rubyforge-web-server-down/82254)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 9\
**Last updated:** [September 25, 2007, 10:33pm UTC](https://www.ruby-forum.com/t/is-the-rubyforge-web-server-down/82254 "2007-09-25T22:33:07Z")

</div>

Hello, I’ve been trying all morning to install “fastercsv” on my server, but, it appears that the rubyforge server is down. I can’t go to http://rubygems/rubyforge.org in my browser either. Anybody know about this? T…

---

## [Garbage collection and Arrays](https://www.ruby-forum.com/t/garbage-collection-and-arrays/82475)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 4\
**Last updated:** [September 25, 2007, 10:32pm UTC](https://www.ruby-forum.com/t/garbage-collection-and-arrays/82475 "2007-09-25T22:32:59Z")

</div>

Hi, I seem to be running in to some garbage collection weirdness. Hopefully someone will have some insight for me… My sample script seems to leak Strings when I use shift on an Array, but not pop: array = \[\] 10.time…

---

## [Re: Word Blender (#108)](https://www.ruby-forum.com/t/re-word-blender-108/225937)

<div class="topic-metadata">

**Author:** [@dpitman](https://www.ruby-forum.com/u/dpitman)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 10:32pm UTC](https://www.ruby-forum.com/t/re-word-blender-108/225937 "2007-09-25T22:32:51Z")

</div>

Hi, I’m new to ruby and this is my first quiz entry, so feel free to offer any feedback/suggestions etc. Requires file english.txt (dicttionary) to be in same dir as source. Play is very basic as I’ve had to fit thi…

---

## [Dir.tmpdr mac os x](https://www.ruby-forum.com/t/dir-tmpdr-mac-os-x/82304)

<div class="topic-metadata">

**Author:** [@ktheory](https://www.ruby-forum.com/u/ktheory)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 10:32pm UTC](https://www.ruby-forum.com/t/dir-tmpdr-mac-os-x/82304 "2007-09-25T22:32:27Z")

</div>

Hey All, Has anyone experienced Dir.tmpdir being undefined on a mac os x? thanks. smith

---

## [How to retrieve some photos stored on Amazon with Ruby on Ra](https://www.ruby-forum.com/t/how-to-retrieve-some-photos-stored-on-amazon-with-ruby-on-ra/81667)

<div class="topic-metadata">

**Author:** [@nik](https://www.ruby-forum.com/u/nik)\
**Replies:** 6\
**Last updated:** [September 25, 2007, 10:32pm UTC](https://www.ruby-forum.com/t/how-to-retrieve-some-photos-stored-on-amazon-with-ruby-on-ra/81667 "2007-09-25T22:32:23Z")

</div>

Hello all! Thanks for reading my post first! Would anyone be kind enough to instruct me to link my photos I uploaded to Amazon S3 (by using JungleDisk) on my Ruby on Rails app? If there’s already an article, could yo…

---

## [Re: Microsoft Timestamp (Active Directory)](https://www.ruby-forum.com/t/re-microsoft-timestamp-active-directory/65368)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 8\
**Last updated:** [September 25, 2007, 10:31pm UTC](https://www.ruby-forum.com/t/re-microsoft-timestamp-active-directory/65368 "2007-09-25T22:31:26Z")

</div>

its in this format: 128002727440808261 How do I convert this to something more…nice??? Leave it to Microsoft to come up with something this convoluted: http://www.microsoft.com/technet/scriptcenter/topics/win2003/l…

---

## [Error when tryinh to install cached\_model](https://www.ruby-forum.com/t/error-when-tryinh-to-install-cached-model/82421)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 10:30pm UTC](https://www.ruby-forum.com/t/error-when-tryinh-to-install-cached-model/82421 "2007-09-25T22:30:21Z")

</div>

hi to all when i m trying to install cached\_model using gem so i m getting error like below $sudo gem install cached\_model --include-dependencies Illegal instruction (core dumped)

---

## [Ruby Reports Mailing List moves to google](https://www.ruby-forum.com/t/ruby-reports-mailing-list-moves-to-google/82348)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 10:30pm UTC](https://www.ruby-forum.com/t/ruby-reports-mailing-list-moves-to-google/82348 "2007-09-25T22:30:15Z")

</div>

Hi folks, To deal with various problems with our current setup and possibly gain some new bells and whistles, the Ruport list will be moving to google groups. You can sign up here: http://groups-beta.google.com/grou…

---

## [Ruby iconv UTF-8 to ISO-8859-2 (Polish)](https://www.ruby-forum.com/t/ruby-iconv-utf-8-to-iso-8859-2-polish/81045)

<div class="topic-metadata">

**Author:** [@Tobes](https://www.ruby-forum.com/u/Tobes)\
**Replies:** 9\
**Last updated:** [September 25, 2007, 10:30pm UTC](https://www.ruby-forum.com/t/ruby-iconv-utf-8-to-iso-8859-2-polish/81045 "2007-09-25T22:30:11Z")

</div>

Hi there, I’ve been using Iconv with Ruby (OnRails) quite successfully for some time. We keep text as UTF-8 in our mysql database, and then convert it using Iconv to ISO-8859-1 when rendering PDF files in English, Dan…

---

## [Sup 0.0.5 Released](https://www.ruby-forum.com/t/sup-0-0-5-released/81246)

<div class="topic-metadata">

**Author:** [@trucker](https://www.ruby-forum.com/u/trucker)\
**Replies:** 8\
**Last updated:** [September 25, 2007, 10:29pm UTC](https://www.ruby-forum.com/t/sup-0-0-5-released/81246 "2007-09-25T22:29:25Z")

</div>

Summary: bugfixes, and a user’s guide. Also on the web: http://sup.rubyforge.org/UserGuide.txt sup version 0.0.5 has been released! http://sup.rubyforge.org Sup is a console-based email client that combines the best …

---

## [Meta programming might dump core](https://www.ruby-forum.com/t/meta-programming-might-dump-core/115387)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 10:06pm UTC](https://www.ruby-forum.com/t/meta-programming-might-dump-core/115387 "2007-09-25T22:06:38Z")

</div>

e$B1sF#$H?=$7$^$9!#e(B e$B$/$@$i$J$$Js9p$P$+$j$G62=L$G$9$,!"e(B\[ruby-dev:31848\] e$B$H;w$?$h$&$J%P%0$re(B e$BE,Ev$KC5$7$F$\_$^$7$?!#e(B1.9 e$B$P$C$+$j$G$9!#e(B e$B860x$rD4$Y$k5$NO$,L5$$$N$GJs9p$@$1$G$9$\_$^$;$s!#e(B e$B…

---

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

<div class="topic-metadata">

**Author:** [@steve\_d](https://www.ruby-forum.com/u/steve_d)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 9:46pm UTC](https://www.ruby-forum.com/t/re-shirt-reader-140/115305 "2007-09-25T21:46:43Z")

</div>

Hi all, my solution: http://rn86.net/~stevedp/tshirt\_reader.tar.gz For my solution I used a combination of the Metaphone algorithm, pronunciation matching (via CMU pronunciation dictionary \[The CMU Pronouncing Dictio…

---

## [Huge \`if' dumps core](https://www.ruby-forum.com/t/huge-if-dumps-core/115383)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 4\
**Last updated:** [September 25, 2007, 9:17pm UTC](https://www.ruby-forum.com/t/huge-if-dumps-core/115383 "2007-09-25T21:17:43Z")

</div>

e$B1sF#$H?=$7$^$9!#e(B e$B0J2\<$N$h$&$K$9$k$He(B 1.8 e$B!"e(B1.9 e$B6&$KMn$A$^$9!#e(B $ ./ruby -ve ‘eval(“if false then;” + “elsif false then;” \* 1000000 + “end”)’ ruby 1.8.6 (2007-09-23 patchlevel 5000) \[i686-linux\] …

---

## [Metadata 1.2](https://www.ruby-forum.com/t/metadata-1-2/115503)

<div class="topic-metadata">

**Author:** [@Ilmari\_H](https://www.ruby-forum.com/u/Ilmari_H)\
**Replies:** 0\
**Last updated:** [September 25, 2007, 8:57pm UTC](https://www.ruby-forum.com/t/metadata-1-2/115503 "2007-09-25T20:57:37Z")

</div>

tarball: http://dark.fhtr.org/repos/metadata/metadata-1.2.tar.gz gem: http://dark.fhtr.org/repos/metadata/metadata-1.2.gem git: http://dark.fhtr.org/repos/metadata Changes fixed id3v2 date parsing audio genres are t…

---

## [What is the WxRuby equivalent to Grid in Tk](https://www.ruby-forum.com/t/what-is-the-wxruby-equivalent-to-grid-in-tk/115495)

<div class="topic-metadata">

**Author:** [@jayson](https://www.ruby-forum.com/u/jayson)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 8:47pm UTC](https://www.ruby-forum.com/t/what-is-the-wxruby-equivalent-to-grid-in-tk/115495 "2007-09-25T20:47:36Z")

</div>

Hi All, What is the equivalent to Grid in Tk, for WxRuby? I see in the documentation references to Sizers, but I cant quite figure out how to use them, or if this is what I should be using. Thanks Jayson

---

## [Problem with Iconv](https://www.ruby-forum.com/t/problem-with-iconv/115439)

<div class="topic-metadata">

**Author:** [@silvertab](https://www.ruby-forum.com/u/silvertab)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 8:35pm UTC](https://www.ruby-forum.com/t/problem-with-iconv/115439 "2007-09-25T20:35:49Z")

</div>

I have a weird problem with Iconv… I’m trying to use it to generate a permalink (so it removes all accentuated characters like french accents etc…)… It was working well when I was running RoR on cygwin… Now with Insta…

---

## [Snippet - svn\_grep.rb](https://www.ruby-forum.com/t/snippet-svn-grep-rb/115501)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 0\
**Last updated:** [September 25, 2007, 8:27pm UTC](https://www.ruby-forum.com/t/snippet-svn-grep-rb/115501 "2007-09-25T20:27:32Z")

</div>

Rails and SVN aficionados: My colleague wrote a lite Ruby wrapper on SVN --xml that helps those of us getting on in years grep our log for some bygone code. The result is completely brute force, and does not exclude l…

---

## [Age to birth year](https://www.ruby-forum.com/t/age-to-birth-year/115496)

<div class="topic-metadata">

**Author:** [@eggie5](https://www.ruby-forum.com/u/eggie5)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 8:01pm UTC](https://www.ruby-forum.com/t/age-to-birth-year/115496 "2007-09-25T20:01:27Z")

</div>

Given the string “18” which is the age of a person, how can I get the year of birth?

---

## [Memory use question](https://www.ruby-forum.com/t/memory-use-question/115403)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 7:18pm UTC](https://www.ruby-forum.com/t/memory-use-question/115403 "2007-09-25T19:18:21Z")

</div>

When I run a program, with these objects, it uses around 15-20MB of RAM, thus: VmPeak: 34308 kB VmSize: 31312 kB VmLck: 0 kB VmHWM: 18808 kB VmRSS: 16144 kB VmData: 21224 kB VmStk: …

---

## [ObjectSpace.define\_finalizer and memory leaks](https://www.ruby-forum.com/t/objectspace-define-finalizer-and-memory-leaks/115484)

<div class="topic-metadata">

**Author:** [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Replies:** 5\
**Last updated:** [September 25, 2007, 6:50pm UTC](https://www.ruby-forum.com/t/objectspace-define-finalizer-and-memory-leaks/115484 "2007-09-25T18:50:12Z")

</div>

i don’t think i’ve ever noticed this behaviour: cfp:~ \> cat a.rb class C def self.count c = 0 ObjectSpace.each\_object do |object| c += 1 if self === object rescue next end c end end loop do c = nil ### try w…

---

## [Web scraping for Cisco products](https://www.ruby-forum.com/t/web-scraping-for-cisco-products/115483)

<div class="topic-metadata">

**Author:** [@animate123](https://www.ruby-forum.com/u/animate123)\
**Replies:** 0\
**Last updated:** [September 25, 2007, 6:09pm UTC](https://www.ruby-forum.com/t/web-scraping-for-cisco-products/115483 "2007-09-25T18:09:46Z")

</div>

I’m scraping through about 1000 web pages that I have from a list to see which ones are selling Cisco equipment. I’m looking for about twenty or so products from a list that I have. Does anyone have any advice on how …

---

## [Array manipulation](https://www.ruby-forum.com/t/array-manipulation/115464)

<div class="topic-metadata">

**Author:** [@analogy](https://www.ruby-forum.com/u/analogy)\
**Replies:** 4\
**Last updated:** [September 25, 2007, 6:06pm UTC](https://www.ruby-forum.com/t/array-manipulation/115464 "2007-09-25T18:06:03Z")

</div>

Hi Folks, I have a general newbie type question Say I have a 2D array that I obtained from an external program: array = \[\[“a”, “b”, “”, “c”, “5”\], \[“d”, “e”, “f”, “9.0”, “7”, “g”, “”, “”, “”\], \["", “h”, “5”, “”, “”\]\] …

---

## [FreeIDE of ruby's project is dead?](https://www.ruby-forum.com/t/freeide-of-rubys-project-is-dead/115480)

<div class="topic-metadata">

**Author:** [@bkeh12](https://www.ruby-forum.com/u/bkeh12)\
**Replies:** 0\
**Last updated:** [September 25, 2007, 5:51pm UTC](https://www.ruby-forum.com/t/freeide-of-rubys-project-is-dead/115480 "2007-09-25T17:51:40Z")

</div>

Hi, Other IDE like as RDT(eclipse) or netbean…aren’t pure ruby. So ruby must be to build self’s IDE in 100% pure ruby.

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

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