# Ruby

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

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

---

## [Ruby Regex](https://www.ruby-forum.com/t/ruby-regex/167270)

<div class="topic-metadata">

**Author:** [@sriram](https://www.ruby-forum.com/u/sriram)\
**Replies:** 5\
**Last updated:** [May 6, 2009, 1:54pm UTC](https://www.ruby-forum.com/t/ruby-regex/167270 "2009-05-06T13:54:40Z")

</div>

Hello, I have this string: "d:\\\\home\\\\abc2.zip\\\\abc.zip\\\\abc.com" I need to extract the contents up to the first occurrence of zip which would be: “d:\\home\\abc2.zip” When i use a regex like: (.+).zip\\ it gives me t…

---

## [Localmemcache-0.4.0: A persistent key-value database based on mmap()'ed shared memory](https://www.ruby-forum.com/t/localmemcache-0-4-0-a-persistent-key-value-database-based-on-mmap-ed-shared-memory/167290)

<div class="topic-metadata">

**Author:** [@Sven\_CSKoehler](https://www.ruby-forum.com/u/Sven_CSKoehler)\
**Replies:** 0\
**Last updated:** [May 6, 2009, 1:09pm UTC](https://www.ruby-forum.com/t/localmemcache-0-4-0-a-persistent-key-value-database-based-on-mmap-ed-shared-memory/167290 "2009-05-06T13:09:31Z")

</div>

Hi, I am happy to release localmemcache 0.4.0 today. This version mainly aims to make the API more complete and less confusing to users (thanks for your feedback!). The version jump is mostly because of incompatibl…

---

## [Unexpected BigDecimal rounding issue](https://www.ruby-forum.com/t/unexpected-bigdecimal-rounding-issue/167257)

<div class="topic-metadata">

**Author:** [@samlown](https://www.ruby-forum.com/u/samlown)\
**Replies:** 5\
**Last updated:** [May 6, 2009, 1:07pm UTC](https://www.ruby-forum.com/t/unexpected-bigdecimal-rounding-issue/167257 "2009-05-06T13:07:08Z")

</div>

Hi, Some more not so fun rounding issues. Using Floats: ((30 / 1.16) \* 1.16) == 30 =\> true Cool, so you’d think it would work with BigDecimal: ((30 / BigDecimal(“1.16”)) \* BigDecimal(“1.16”)) == 30 =\> false …

---

## [Question regarding content-type and multipart form data](https://www.ruby-forum.com/t/question-regarding-content-type-and-multipart-form-data/167286)

<div class="topic-metadata">

**Author:** [@Tor\_Houghton](https://www.ruby-forum.com/u/Tor_Houghton)\
**Replies:** 0\
**Last updated:** [May 6, 2009, 12:56pm UTC](https://www.ruby-forum.com/t/question-regarding-content-type-and-multipart-form-data/167286 "2009-05-06T12:56:35Z")

</div>

Hello, I’m possibly missing something, but I’m at a loss at how to obtain the Content-Type: information for data uploaded using a form, e.g.: -----------------------------79833303215853703371881803053 Content-Disposi…

---

## [An array to string in different lines](https://www.ruby-forum.com/t/an-array-to-string-in-different-lines/167280)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 1\
**Last updated:** [May 6, 2009, 12:30pm UTC](https://www.ruby-forum.com/t/an-array-to-string-in-different-lines/167280 "2009-05-06T12:30:44Z")

</div>

Hi I am collecting errors like object.errors.on(:field) So some times i get it like an array \[“error1\_message”,“error2\_message”\] or “error1\_message” a string So how can i format this in more than one line if its …

---

## [Inexplicable "undefined local variable" error\`](https://www.ruby-forum.com/t/inexplicable-undefined-local-variable-error/167284)

<div class="topic-metadata">

**Author:** [@tbcox23](https://www.ruby-forum.com/u/tbcox23)\
**Replies:** 0\
**Last updated:** [May 6, 2009, 12:20pm UTC](https://www.ruby-forum.com/t/inexplicable-undefined-local-variable-error/167284 "2009-05-06T12:20:11Z")

</div>

This makes no sense to me, so…I could use a little help In my main program I read in some ruby from an external file: eval( File.read( “…/lib/setnet/Utilities.rb” ) ) I check a variable which should now be defined (by…

---

## [Nagios ruby script - code review](https://www.ruby-forum.com/t/nagios-ruby-script-code-review/167283)

<div class="topic-metadata">

**Author:** [@johny006](https://www.ruby-forum.com/u/johny006)\
**Replies:** 0\
**Last updated:** [May 6, 2009, 11:59am UTC](https://www.ruby-forum.com/t/nagios-ruby-script-code-review/167283 "2009-05-06T11:59:33Z")

</div>

Hi, I’ve wrote my first ruby script. It’s a nagios plugin who get a full webpage. Main features: \* Ruby small script, easy to understand and hack (I hope) … \* http/https \* Use the powerful and simple hpricot lib to…

---

## [Win32-api for Jruby in the works](https://www.ruby-forum.com/t/win32-api-for-jruby-in-the-works/167216)

<div class="topic-metadata">

**Author:** [@paulf](https://www.ruby-forum.com/u/paulf)\
**Replies:** 5\
**Last updated:** [May 6, 2009, 11:35am UTC](https://www.ruby-forum.com/t/win32-api-for-jruby-in-the-works/167216 "2009-05-06T11:35:35Z")

</div>

mailto:win32utils-devel%40rubyforge.org?Subject=Re%3A%20\[Win32utils-devel\]%20New%20win32-api%20for%20Jruby%20in%20the%20works&In-Reply-To=\<7524A45A1A5B264FA4809E2156496CFB04514C9B%40ITOMAE2KM01.AD.QINTRA.COM\>Hi, Comment…

---

## [Map Ruby Program Call Hierarchy](https://www.ruby-forum.com/t/map-ruby-program-call-hierarchy/167263)

<div class="topic-metadata">

**Author:** [@roxah](https://www.ruby-forum.com/u/roxah)\
**Replies:** 1\
**Last updated:** [May 6, 2009, 10:29am UTC](https://www.ruby-forum.com/t/map-ruby-program-call-hierarchy/167263 "2009-05-06T10:29:21Z")

</div>

Hello all, I’m wondering if a Ruby library exists that makes it possible to map the call hierarchy of a Ruby program. For example, given a command-line program with different options, I’d like to be able to run the p…

---

## [Computers and Laptops](https://www.ruby-forum.com/t/computers-and-laptops/167273)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [May 6, 2009, 9:33am UTC](https://www.ruby-forum.com/t/computers-and-laptops/167273 "2009-05-06T09:33:03Z")

</div>

Information about Computer,Software and Laptops for more info visit (in-computersandlaptops.blogspot.com)

---

## [Matching arbitrary number of fields](https://www.ruby-forum.com/t/matching-arbitrary-number-of-fields/167264)

<div class="topic-metadata">

**Author:** [@adambeazley](https://www.ruby-forum.com/u/adambeazley)\
**Replies:** 1\
**Last updated:** [May 6, 2009, 9:30am UTC](https://www.ruby-forum.com/t/matching-arbitrary-number-of-fields/167264 "2009-05-06T09:30:42Z")

</div>

I want to parse commands from a text file. The commands are of the form: command “param 1” “param 2” command “param” command “param 1” “param 2” “param 3” Each command will have one or more parameters. Each parame…

---

## [A DSL + scope problem](https://www.ruby-forum.com/t/a-dsl-scope-problem/167191)

<div class="topic-metadata">

**Author:** [@Srijayanth\_S](https://www.ruby-forum.com/u/Srijayanth_S)\
**Replies:** 4\
**Last updated:** [May 6, 2009, 9:13am UTC](https://www.ruby-forum.com/t/a-dsl-scope-problem/167191 "2009-05-06T09:13:40Z")

</div>

Hello, Wrt: http://groups.google.com/group/comp.lang.ruby/browse\_thread/thread/689cbe271d680979/5ba5a52ba929b142?lnk=raot&fwc=2&pli=1 Basically I have a log file where different lines need to be mapped to different s…

---

## [Lacking in mathematical functions](https://www.ruby-forum.com/t/lacking-in-mathematical-functions/167271)

<div class="topic-metadata">

**Author:** [@Takeshi\_NISHIMATSU](https://www.ruby-forum.com/u/Takeshi_NISHIMATSU)\
**Replies:** 0\
**Last updated:** [May 6, 2009, 8:43am UTC](https://www.ruby-forum.com/t/lacking-in-mathematical-functions/167271 "2009-05-06T08:43:48Z")

</div>

Do you want more mathematical functions in Ruby? I do! Here is a list of mathematical functions Ruby does not have. Please add your favorites. This issue was discussed in Japanese in \[ruby-list:44246\], \[ruby-list:458…

---

## [Interfce for Svn](https://www.ruby-forum.com/t/interfce-for-svn/167268)

<div class="topic-metadata">

**Author:** [@charanya](https://www.ruby-forum.com/u/charanya)\
**Replies:** 0\
**Last updated:** [May 6, 2009, 8:04am UTC](https://www.ruby-forum.com/t/interfce-for-svn/167268 "2009-05-06T08:04:27Z")

</div>

Hi I am trying to combine SVN with my application. I want to get a file from the svn repository of the current version. My app will provide facility for the user to upload a diff file. And from this diff file and the…

---

## [IO.copy\_stream doesn't convert encodings](https://www.ruby-forum.com/t/io-copy-stream-doesnt-convert-encodings/167116)

<div class="topic-metadata">

**Author:** [@sheepman](https://www.ruby-forum.com/u/sheepman)\
**Replies:** 1\
**Last updated:** [May 6, 2009, 7:54am UTC](https://www.ruby-forum.com/t/io-copy-stream-doesnt-convert-encodings/167116 "2009-05-06T07:54:04Z")

</div>

e$B$3$s$K$A$Oe(B sheepman e$B$G$9!#e(B e$BKhEY:Y$+$$$3$H$G62=L$G$9$,!#e(B e$B%(%s%3!\<%G%#%s%0$r;XDj$7$Fe(B open e$B$7$?e(B IO e$B%\*%V%8%’%/%H$rM?$($F$b!“e(B IO.copy\_stream e$B$,%(%s%3!\<%G%#%s%0$rJQ49$7$^$;$s!#e(B e$…

---

## [Tips for a Successful Interview](https://www.ruby-forum.com/t/tips-for-a-successful-interview/167267)

<div class="topic-metadata">

**Author:** [@Jaggu\_BN](https://www.ruby-forum.com/u/Jaggu_BN)\
**Replies:** 0\
**Last updated:** [May 6, 2009, 7:36am UTC](https://www.ruby-forum.com/t/tips-for-a-successful-interview/167267 "2009-05-06T07:36:32Z")

</div>

Some Do’s of the Interview The interview is the most important occasion, which proves a turning point in the life of the candidate if he is able to impress the interviewer or the Board of interview. It is therefore…

---

## [Job opportunity for Ruby developer in Viet Nam](https://www.ruby-forum.com/t/job-opportunity-for-ruby-developer-in-viet-nam/167261)

<div class="topic-metadata">

**Author:** [@Hong\_van\_D](https://www.ruby-forum.com/u/Hong_van_D)\
**Replies:** 0\
**Last updated:** [May 6, 2009, 4:51am UTC](https://www.ruby-forum.com/t/job-opportunity-for-ruby-developer-in-viet-nam/167261 "2009-05-06T04:51:39Z")

</div>

Our company has job opportunity for Ruby developer in Viet Nam. If you are interested in, please access vietnamwork.com to see Job opportunity of Officience company.

---

## [My logroll code, please critique](https://www.ruby-forum.com/t/my-logroll-code-please-critique/167175)

<div class="topic-metadata">

**Author:** [@bloodniece](https://www.ruby-forum.com/u/bloodniece)\
**Replies:** 11\
**Last updated:** [May 6, 2009, 4:28am UTC](https://www.ruby-forum.com/t/my-logroll-code-please-critique/167175 "2009-05-06T04:28:19Z")

</div>

My goal is to keep 10 files each at 100Mb. Please critique and suggest any corrections I need to make. Thank you! #!/usr/bin/ruby -w -W 2 require ‘ftools’ require ‘fileutils’ =begin #----------------------------- …

---

## [Cross-compiling 1.9.1-p0 to bfin-uclinux](https://www.ruby-forum.com/t/cross-compiling-1-9-1-p0-to-bfin-uclinux/167156)

<div class="topic-metadata">

**Author:** [@abg](https://www.ruby-forum.com/u/abg)\
**Replies:** 4\
**Last updated:** [May 6, 2009, 3:14am UTC](https://www.ruby-forum.com/t/cross-compiling-1-9-1-p0-to-bfin-uclinux/167156 "2009-05-06T03:14:26Z")

</div>

Greetings – I am trying to see whether I can build ruby to run on an Analog Devices Blackfin processor. The toolchain (with bfin-uclinux-gcc being the compiler) is available here: …using the latest 2008R1.5\_RC14 r…

---

## [REXML (1.8.6-p110) backwards compatibility problem with rcov](https://www.ruby-forum.com/t/rexml-1-8-6-p110-backwards-compatibility-problem-with-rcov/117908)

<div class="topic-metadata">

**Author:** [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Replies:** 9\
**Last updated:** [May 6, 2009, 2:57am UTC](https://www.ruby-forum.com/t/rexml-1-8-6-p110-backwards-compatibility-problem-with-rcov/117908 "2009-05-06T02:57:14Z")

</div>

When I upgraded my Ubuntu 6.06.1 system from its stock ruby-1.8.4 to ruby-1.8.6-p110, I found that the previously working rcov-0.8.0.2 was raising REXML exceptions when it tried to generate its output (\*) I needed to …

---

## [Not able to install POpen4 gem](https://www.ruby-forum.com/t/not-able-to-install-popen4-gem/167252)

<div class="topic-metadata">

**Author:** [@cesardiaz](https://www.ruby-forum.com/u/cesardiaz)\
**Replies:** 0\
**Last updated:** [May 6, 2009, 12:22am UTC](https://www.ruby-forum.com/t/not-able-to-install-popen4-gem/167252 "2009-05-06T00:22:58Z")

</div>

Hi, I am really confused. I am trying to install the POpen4 gem and it seems that it is not in any repository, but it is. See the following: C:\\Documents and Settings\\CÃ©sar\\Mis documentos\\NetBeansProjects\\music\>gem …

---

## [Strinpping html using regexp](https://www.ruby-forum.com/t/strinpping-html-using-regexp/167215)

<div class="topic-metadata">

**Author:** [@arunvoip](https://www.ruby-forum.com/u/arunvoip)\
**Replies:** 4\
**Last updated:** [May 6, 2009, 12:15am UTC](https://www.ruby-forum.com/t/strinpping-html-using-regexp/167215 "2009-05-06T00:15:08Z")

</div>

Hi, I want to remove the all html tags in a string using regexp. But the main thing is I dont want to use gsub or any other methods for it. I want pure regexp to fetch the data other than the html tags. Can anybody p…

---

## [Code Review: Precompilation5](https://www.ruby-forum.com/t/code-review-precompilation5/167240)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 1\
**Last updated:** [May 5, 2009, 11:29pm UTC](https://www.ruby-forum.com/t/code-review-precompilation5/167240 "2009-05-05T23:29:14Z")

</div>

tfpt review “/shelveset:Precompilation5;REDMOND\\tomat” Mostly Ruby changes, one simple DLR change. Implements precompilation of simple Ruby method invocations. Adds pre-generated rules for call sites that are cont…

---

## [(mandriva 2009) problem with installation kdevelop/ruby/Qt](https://www.ruby-forum.com/t/mandriva-2009-problem-with-installation-kdevelop-ruby-qt/167208)

<div class="topic-metadata">

**Author:** [@jolivierld](https://www.ruby-forum.com/u/jolivierld)\
**Replies:** 4\
**Last updated:** [May 5, 2009, 11:07pm UTC](https://www.ruby-forum.com/t/mandriva-2009-problem-with-installation-kdevelop-ruby-qt/167208 "2009-05-05T23:07:34Z")

</div>

hello, I would like to use kdevelop with Qt and ruby with a mandriva 2009. so I downloaded kdevelop from the mandriva packages, it runs fine. then, I installed Qt, and ruby.ok. then, I had to install the binding Qt-k…

---

## [Http://rubypan.org/ version 1.1.0 has been released!](https://www.ruby-forum.com/t/http-rubypan-org-version-1-1-0-has-been-released/167154)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 1\
**Last updated:** [May 5, 2009, 11:05pm UTC](https://www.ruby-forum.com/t/http-rubypan-org-version-1-1-0-has-been-released/167154 "2009-05-05T23:05:47Z")

</div>

http://rubypan.org/ version 1.0.0 has been released! http://rubypan.org/ RubyPAN dot org is like CPAN dot org but for Ruby Gems. The source for rubypan.org is located here: GitHub - tenderlove/rubypan To report a …

---

## [Code Review: ArityFixes](https://www.ruby-forum.com/t/code-review-arityfixes/167250)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [May 5, 2009, 10:54pm UTC](https://www.ruby-forum.com/t/code-review-arityfixes/167250 "2009-05-05T22:54:04Z")

</div>

tfpt review “/shelveset:ArityFixes;REDMOND\\tomat” Enables remaining Method specs. Fixes a couple of failures due to wrong arity calculation. Tomas

---

## [Code Review: ToProc1](https://www.ruby-forum.com/t/code-review-toproc1/167244)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 2\
**Last updated:** [May 5, 2009, 10:32pm UTC](https://www.ruby-forum.com/t/code-review-toproc1/167244 "2009-05-05T22:32:24Z")

</div>

tfpt review “/shelveset:ToProc1;REDMOND\\tomat” Implements Method#to\_proc. Tomas

---

## [Error compiling 1.9.1 on Mac OS X](https://www.ruby-forum.com/t/error-compiling-1-9-1-on-mac-os-x/167248)

<div class="topic-metadata">

**Author:** [@mansfiem](https://www.ruby-forum.com/u/mansfiem)\
**Replies:** 0\
**Last updated:** [May 5, 2009, 10:30pm UTC](https://www.ruby-forum.com/t/error-compiling-1-9-1-on-mac-os-x/167248 "2009-05-05T22:30:38Z")

</div>

When making ruby-1.9.1-p0 on Mac OS X (10.5.6), I get the following error: cc -dynamic -bundle -undefined suppress -flat\_namespace -o .ext/i386- darwin9/enc/trans/transdb.bundle enc/trans/transdb.o -L. -L. -L. -L/ op…

---

## [Should I upgrade Ruby from 1.8.5 to 1.8.7?](https://www.ruby-forum.com/t/should-i-upgrade-ruby-from-1-8-5-to-1-8-7/167147)

<div class="topic-metadata">

**Author:** [@caliwildman](https://www.ruby-forum.com/u/caliwildman)\
**Replies:** 22\
**Last updated:** [May 5, 2009, 9:57pm UTC](https://www.ruby-forum.com/t/should-i-upgrade-ruby-from-1-8-5-to-1-8-7/167147 "2009-05-05T21:57:48Z")

</div>

I just upgraded to Rails 2.3.2 but my Ruby is still 1.8.5. Rails 2.3.2 doc says it work fine with 1.8.5 but it recommends 1.8.7. I remembered from a previous attempt that upgrading Ruby to 1.8.6 was too complicated fo…

---

## [Help with facebooker and Desktop Sessions](https://www.ruby-forum.com/t/help-with-facebooker-and-desktop-sessions/167242)

<div class="topic-metadata">

**Author:** [@gramos](https://www.ruby-forum.com/u/gramos)\
**Replies:** 0\
**Last updated:** [May 5, 2009, 9:29pm UTC](https://www.ruby-forum.com/t/help-with-facebooker-and-desktop-sessions/167242 "2009-05-05T21:29:36Z")

</div>

Hi all, I’m trying to get a Facebook Desktop Session with facebooker and rails 2.3.2 I’m trying this in the console: session = Facebooker::Session::Desktop.create =\> #\<Facebooker::Session::desktop:0xb759d4b0 @secr…

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

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