# Ruby

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

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

---

## [Mac OS X $B$N(B ruby 1.9.1p378 $B$G:F(B open $B8e(B delete $B$7$?(B Tempfile $B$,(B closed](https://www.ruby-forum.com/t/mac-os-x-b-n-b-ruby-1-9-1p378-b-g-f-b-open-b8e-b-delete-b-7-b-tempfile-b-b-closed/186972)

<div class="topic-metadata">

**Author:** [@KISHIMOTOS\_Makoto](https://www.ruby-forum.com/u/KISHIMOTOS_Makoto)\
**Replies:** 0\
**Last updated:** [April 15, 2010, 3:44am UTC](https://www.ruby-forum.com/t/mac-os-x-b-n-b-ruby-1-9-1p378-b-g-f-b-open-b8e-b-delete-b-7-b-tempfile-b-b-closed/186972 "2010-04-15T03:44:01Z")

</div>

e$B$-$7$b$H$G$9e(B trunk e$B$K;D$C$F$$$k$+$I$&$+$o$+$j$^$;$s$,!"e(BMacPorts e$B$Ne(B ruby 1.9 e$B$Ge(B e$B0J2\<$N$h$&$J%P%0$r3NG’$7$^$7$?!#!Je(Bruby 1.8 e$B$G$O%(%i!\<$K$J$i$J$$$N$Ge(B e$B%P%0$@$H;W$$$^$9!Ke(B $ ruby…

---

## [I thought spaces didn't matter around operators](https://www.ruby-forum.com/t/i-thought-spaces-didnt-matter-around-operators/186904)

<div class="topic-metadata">

**Author:** [@sackerson](https://www.ruby-forum.com/u/sackerson)\
**Replies:** 14\
**Last updated:** [April 15, 2010, 12:14am UTC](https://www.ruby-forum.com/t/i-thought-spaces-didnt-matter-around-operators/186904 "2010-04-15T00:14:51Z")

</div>

I had understood that operators, like minus (-), had special “syntactic sugar” that allowed me to include or omit spaces around them like this: 1-1 =\> 0 1 -1 =\> 0 1 - 1 =\> 0 1- 1 =\> 0 However, in some cases…

---

## [Re: Confirmation of contributor status...?](https://www.ruby-forum.com/t/re-confirmation-of-contributor-status/186958)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 0\
**Last updated:** [April 14, 2010, 10:48pm UTC](https://www.ruby-forum.com/t/re-confirmation-of-contributor-status/186958 "2010-04-14T22:48:57Z")

</div>

After talking to the Codeplex team (they handle the agreement process), it turns out Ssiadmin has been deprecated and the new process involves the Codeplex feedback form. I’ll be updating the wiki. JD From: Jimmy S.…

---

## [Gem help](https://www.ruby-forum.com/t/gem-help/186887)

<div class="topic-metadata">

**Author:** [@homer-16](https://www.ruby-forum.com/u/homer-16)\
**Replies:** 4\
**Last updated:** [April 14, 2010, 10:11pm UTC](https://www.ruby-forum.com/t/gem-help/186887 "2010-04-14T22:11:10Z")

</div>

I’m trying to DL a gem but I keep getting this message: E:\\Ruby\\bin\>cmd /k “F:\\Torque Game Engine Demo\\System\\Hack\\Ruby\\bin\\gem.bat” The system cannot find the drive specified. E:\\Ruby\\bin\>gem i narray Building nati…

---

## [Uploading RoR application to server site](https://www.ruby-forum.com/t/uploading-ror-application-to-server-site/186946)

<div class="topic-metadata">

**Author:** [@zzzzzz](https://www.ruby-forum.com/u/zzzzzz)\
**Replies:** 1\
**Last updated:** [April 14, 2010, 9:50pm UTC](https://www.ruby-forum.com/t/uploading-ror-application-to-server-site/186946 "2010-04-14T21:50:41Z")

</div>

Hi, i’m new in RoR. I’m working in windows Xp, have domain on www.Site5.com with RoR support, bit don’t know how upload basic application. Does anyone know the easiest way how to do it? Thanks, zz

---

## [Webgen 0.5.12 released](https://www.ruby-forum.com/t/webgen-0-5-12-released/186950)

<div class="topic-metadata">

**Author:** [@tlockney](https://www.ruby-forum.com/u/tlockney)\
**Replies:** 0\
**Last updated:** [April 14, 2010, 8:57pm UTC](https://www.ruby-forum.com/t/webgen-0-5-12-released/186950 "2010-04-14T20:57:41Z")

</div>

Hey everybody! webgen 0.5.12 has just been released! If you don’t know what webgen is, read the “What’s webgen?” section down below. This announcement is also available at http://webgen.rubyforge.org/news/release\_0\_5…

---

## [Confirmation of contributor status...?](https://www.ruby-forum.com/t/confirmation-of-contributor-status/186813)

<div class="topic-metadata">

**Author:** [@Zac\_Brown](https://www.ruby-forum.com/u/Zac_Brown)\
**Replies:** 4\
**Last updated:** [April 14, 2010, 7:57pm UTC](https://www.ruby-forum.com/t/confirmation-of-contributor-status/186813 "2010-04-14T19:57:59Z")

</div>

Hi, I sent an email to ssiadmin asking them to add me as a contributor to IronRuby but haven’t heard a peep out of them. What’s the usual turn around for emails sent to them? Sidenote: I asked to be confirmed on this…

---

## [Method to groom a string to floating point representation](https://www.ruby-forum.com/t/method-to-groom-a-string-to-floating-point-representation/186834)

<div class="topic-metadata">

**Author:** [@alexd](https://www.ruby-forum.com/u/alexd)\
**Replies:** 15\
**Last updated:** [April 14, 2010, 5:47pm UTC](https://www.ruby-forum.com/t/method-to-groom-a-string-to-floating-point-representation/186834 "2010-04-14T17:47:25Z")

</div>

I have a program that asks for the user to enter a string that represents a floating point number. Everytime a new character is typed I want a method that checks to make sure the string makes sense as a floating poin…

---

## [\[Bug #3146\] ERB single line comment does not work](https://www.ruby-forum.com/t/bug-3146-erb-single-line-comment-does-not-work/186931)

<div class="topic-metadata">

**Author:** [@Yusuke\_E](https://www.ruby-forum.com/u/Yusuke_E)\
**Replies:** 2\
**Last updated:** [April 14, 2010, 4:37pm UTC](https://www.ruby-forum.com/t/bug-3146-erb-single-line-comment-does-not-work/186931 "2010-04-14T16:37:09Z")

</div>

Bug #3146: ERB single line comment does not work http://redmine.ruby-lang.org/issues/show/3146 e$B5/I\<\<Te(B: Yusuke E. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$BC4Ev\<Te(B: Masatoshi Seki, Target version: 1.9.2 …

---

## [Cumulative sum by month](https://www.ruby-forum.com/t/cumulative-sum-by-month/186934)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 0\
**Last updated:** [April 14, 2010, 3:47pm UTC](https://www.ruby-forum.com/t/cumulative-sum-by-month/186934 "2010-04-14T15:47:30Z")

</div>

Hey all, While it is possible to doc cumulative sum by month in mysql using MONTH and COUNT statements, I’m trying to figure out if the same kind of statement is available in ruby, something like a substitute for the …

---

## [\[Bug #1676\] only last "return" is traced by set\_trace\_func](https://www.ruby-forum.com/t/bug-1676-only-last-return-is-traced-by-set-trace-func/170755)

<div class="topic-metadata">

**Author:** [@SSwanabe](https://www.ruby-forum.com/u/SSwanabe)\
**Replies:** 9\
**Last updated:** [April 14, 2010, 2:45pm UTC](https://www.ruby-forum.com/t/bug-1676-only-last-return-is-traced-by-set-trace-func/170755 "2010-04-14T14:45:17Z")

</div>

Bug #1676: only last “return” is traced by set\_trace\_func http://redmine.ruby-lang.org/issues/show/1676 e$B5/I\<\<Te(B: \_ wanabe e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Low ruby -v: ruby 1.9.2dev (2009-06-21 trunk 23809)…

---

## [Newbie: Control flow of tests using 'define\_method'](https://www.ruby-forum.com/t/newbie-control-flow-of-tests-using-define-method/197195)

<div class="topic-metadata">

**Author:** [@chriscole](https://www.ruby-forum.com/u/chriscole)\
**Replies:** 2\
**Last updated:** [April 14, 2010, 2:42pm UTC](https://www.ruby-forum.com/t/newbie-control-flow-of-tests-using-define-method/197195 "2010-04-14T14:42:37Z")

</div>

I am very new to development and even more in the dark when it comes to Ruby, but I am still having fun. :wink: I also apologise for the long snippets of code in this post. I am trying to test a database migration u…

---

## [Error with Rails 3 and Tomcat](https://www.ruby-forum.com/t/error-with-rails-3-and-tomcat/186864)

<div class="topic-metadata">

**Author:** [@azraelnewtype](https://www.ruby-forum.com/u/azraelnewtype)\
**Replies:** 4\
**Last updated:** [April 14, 2010, 12:56pm UTC](https://www.ruby-forum.com/t/error-with-rails-3-and-tomcat/186864 "2010-04-14T12:56:58Z")

</div>

I’m getting a Rack error when trying to run a default Rails app under Tomcat: SEVERE: Application Error org.jruby.rack.RackInitializationException: wrong # of arguments(4 for 3) from /Users/csevans/apache-tomcat-6.…

---

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

<div class="topic-metadata">

**Author:** [@simbolla](https://www.ruby-forum.com/u/simbolla)\
**Replies:** 2\
**Last updated:** [April 14, 2010, 11:37am UTC](https://www.ruby-forum.com/t/excel-manipulation/186918 "2010-04-14T11:37:58Z")

</div>

hi all, Below is the code for manipualting excel data. ================================================ require ‘win32ole’ excelPath = “C:\\vbscript\\sample.xls” application = WIN32OLE.new(‘Excel.Application’) applic…

---

## [I don't know:&:empty?](https://www.ruby-forum.com/t/i-dont-know-empty/186908)

<div class="topic-metadata">

**Author:** [@luofeiyu](https://www.ruby-forum.com/u/luofeiyu)\
**Replies:** 2\
**Last updated:** [April 14, 2010, 10:45am UTC](https://www.ruby-forum.com/t/i-dont-know-empty/186908 "2010-04-14T10:45:26Z")

</div>

there is one commade: ‘\[“ffgh”\]78’.split(/\[|\]/).reject(&:empty?) i can get two character: “ffgh” 78 but i don’t know what is the meaning of : &:empty? 1\\what is : 2\\what is &: think you for advance.

---

## [IronRuby and IronPython](https://www.ruby-forum.com/t/ironruby-and-ironpython/186865)

<div class="topic-metadata">

**Author:** [@Justin\_H.man](https://www.ruby-forum.com/u/Justin_H.man)\
**Replies:** 1\
**Last updated:** [April 14, 2010, 10:02am UTC](https://www.ruby-forum.com/t/ironruby-and-ironpython/186865 "2010-04-14T10:02:33Z")

</div>

Hi all, First, many thanks to the IronRuby team and their outstanding work on the 1.0 release! Now, my question: I want to embed both IronRuby and IronPython in my application. In the past, in order to avoid namesp…

---

## [How can i add tones to my pc's sound card](https://www.ruby-forum.com/t/how-can-i-add-tones-to-my-pcs-sound-card/186911)

<div class="topic-metadata">

**Author:** [@yearl](https://www.ruby-forum.com/u/yearl)\
**Replies:** 0\
**Last updated:** [April 14, 2010, 8:00am UTC](https://www.ruby-forum.com/t/how-can-i-add-tones-to-my-pcs-sound-card/186911 "2010-04-14T08:00:58Z")

</div>

Similar to beep(440,1000), but sound in sound card, not pc speaker.

---

## [How to delete the first two characters of each row?](https://www.ruby-forum.com/t/how-to-delete-the-first-two-characters-of-each-row/186855)

<div class="topic-metadata">

**Author:** [@luofeiyu](https://www.ruby-forum.com/u/luofeiyu)\
**Replies:** 9\
**Last updated:** [April 14, 2010, 7:42am UTC](https://www.ruby-forum.com/t/how-to-delete-the-first-two-characters-of-each-row/186855 "2010-04-14T07:42:39Z")

</div>

how to delete the first two characters of each row? i want to delete the first two characters of each row in file /home/pt/test/mtp.txt io=open("/home/pt/test/mtp.txt",“r”) io1=open("/home/pt/test/mtpback.txt",“w”) …

---

## [Detect whether a key is being held before script execution?](https://www.ruby-forum.com/t/detect-whether-a-key-is-being-held-before-script-execution/186893)

<div class="topic-metadata">

**Author:** [@wet](https://www.ruby-forum.com/u/wet)\
**Replies:** 3\
**Last updated:** [April 14, 2010, 3:43am UTC](https://www.ruby-forum.com/t/detect-whether-a-key-is-being-held-before-script-execution/186893 "2010-04-14T03:43:20Z")

</div>

Hi All! I am looking for a way to have a script detect whether or not a key is pressed and held down before it runs. Basically, I want the script to execute one way if the key is pressed and another if it is not pres…

---

## [\[Bug:trunk\] Failure: test\_priority (TestThread) on mswin32](https://www.ruby-forum.com/t/bug-trunk-failure-test-priority-testthread-on-mswin32/154705)

<div class="topic-metadata">

**Author:** [@U.Nakamura](https://www.ruby-forum.com/u/U.Nakamura)\
**Replies:** 2\
**Last updated:** [April 14, 2010, 3:09am UTC](https://www.ruby-forum.com/t/bug-trunk-failure-test-priority-testthread-on-mswin32/154705 "2010-04-14T03:09:54Z")

</div>

e$B$3$s$K$A$O!"$J$+$\`$ie(B(e$B$&e(B)e$B$G$9!#e(B e$BI=Bj$NDL$j$G$9$,!"e(Bprioritye$B$NDc$$%9%l%C%I$NA\*BrN($r2\<$2$k5!9=e(B e$B$Oe(Bpthreade$B$G$be(Bwin32e$B$G$bF1$8$J$N$K!"e(Bwin32e$B$@$H$^$H$b$K5!G=$7$F$$e(B e$B$J$$$h…

---

## [Rp\_trap\_pending/rb\_trap\_exec in 1.9?](https://www.ruby-forum.com/t/rp-trap-pending-rb-trap-exec-in-1-9/186902)

<div class="topic-metadata">

**Author:** [@elliterate](https://www.ruby-forum.com/u/elliterate)\
**Replies:** 0\
**Last updated:** [April 14, 2010, 2:23am UTC](https://www.ruby-forum.com/t/rp-trap-pending-rb-trap-exec-in-1-9/186902 "2010-04-14T02:23:04Z")

</div>

Hey, I’ve been using rb\_trap\_pending/rb\_trap\_exec in 1.8 to safely interrupt the process at a point where I can allocate objects without upsetting the GC. These have been removed in 1.9 and I don’t see anything simil…

---

## [Rorth v0.3 released](https://www.ruby-forum.com/t/rorth-v0-3-released/186837)

<div class="topic-metadata">

**Author:** [@indigo](https://www.ruby-forum.com/u/indigo)\
**Replies:** 1\
**Last updated:** [April 14, 2010, 2:16am UTC](https://www.ruby-forum.com/t/rorth-v0-3-released/186837 "2010-04-14T02:16:02Z")

</div>

Hello! I am writing a programing language in Ruby called Rorth. It started life as a forth interpreter, but quickly morphed into its own language. You can find Rorth at http://github.com/indigo747/Rorth Features: Co…

---

## [How to find multiple matches in a string](https://www.ruby-forum.com/t/how-to-find-multiple-matches-in-a-string/186881)

<div class="topic-metadata">

**Author:** [@alexd](https://www.ruby-forum.com/u/alexd)\
**Replies:** 10\
**Last updated:** [April 14, 2010, 12:51am UTC](https://www.ruby-forum.com/t/how-to-find-multiple-matches-in-a-string/186881 "2010-04-14T00:51:08Z")

</div>

I know how to use regular expressions to find the first match of a pattern in a string. But, how do I most easily find multiple matches? For example, if the string is s = ‘abcde\_abcde\_abcde’ and I want to find the l…

---

## [The Ruid Concept, with question](https://www.ruby-forum.com/t/the-ruid-concept-with-question/186607)

<div class="topic-metadata">

**Author:** [@thunk](https://www.ruby-forum.com/u/thunk)\
**Replies:** 31\
**Last updated:** [April 13, 2010, 10:32pm UTC](https://www.ruby-forum.com/t/the-ruid-concept-with-question/186607 "2010-04-13T22:32:23Z")

</div>

The Ruid Concept Not Spam (no link, no website, no book, no speech, no nothing like that) Is Ruby (written 100% in ruby, uses Ruby goodness, uses Ruby dynamic OO to the max) Is also CONCEPT – (but is also 100% im…

---

## [PeopleSoft Functional Consultant needed immediately in PA](https://www.ruby-forum.com/t/peoplesoft-functional-consultant-needed-immediately-in-pa/186877)

<div class="topic-metadata">

**Author:** [@jsimone](https://www.ruby-forum.com/u/jsimone)\
**Replies:** 0\
**Last updated:** [April 13, 2010, 6:15pm UTC](https://www.ruby-forum.com/t/peoplesoft-functional-consultant-needed-immediately-in-pa/186877 "2010-04-13T18:15:57Z")

</div>

Hi We have an urgent requirement for a PeopleSoft Functional consultant. Send only matching resumes to removed\_email\_address@domain.invalid This is corp to corp position Rate: DOE Duration - 3-4 months Location – P…

---

## [\[Bug #1031\] -U $B%\*%W%7%g%s$N@bL@$,(B --help $B$K$J$$(B](https://www.ruby-forum.com/t/bug-1031-u-b-w-7-g-s-n-bl-b-help-b-k-j-b/186875)

<div class="topic-metadata">

**Author:** [@Yusuke\_E](https://www.ruby-forum.com/u/Yusuke_E)\
**Replies:** 0\
**Last updated:** [April 13, 2010, 6:11pm UTC](https://www.ruby-forum.com/t/bug-1031-u-b-w-7-g-s-n-bl-b-help-b-k-j-b/186875 "2010-04-13T18:11:16Z")

</div>

e$B%A%1%C%He(B #1031 e$B$,99?7$5$l$^$7$?!#e(B (by Yusuke E.) e$B1sF#$G$9!#e(B e$B$3$s$J$7$g$&$b$J$$%A%1%C%H$O$5$C$5$H7h$a$FJD$8$F$\[$7$$!D!D!#e(B 2010e$BG/e(B3e$B7ne(B25e$BF|e(B15:11 Urabe S. removed\_email\_address@dom…

---

## [Scope limitation causes problems for me](https://www.ruby-forum.com/t/scope-limitation-causes-problems-for-me/186871)

<div class="topic-metadata">

**Author:** [@SSSS\_SSSSSS\_SSSSSSS](https://www.ruby-forum.com/u/SSSS_SSSSSS_SSSSSSS)\
**Replies:** 3\
**Last updated:** [April 13, 2010, 6:01pm UTC](https://www.ruby-forum.com/t/scope-limitation-causes-problems-for-me/186871 "2010-04-13T18:01:54Z")

</div>

hi, everyone. I have the following codes. m = Hash.new(“merong”) m\[“b”\] = “babo” def func begin m\[“a”\] = “merong” rescue =\> e puts e end end func exception is undefined local variable or method \`m’ for main:…

---

## [\[BUG:trunk\] encoding for stdio's](https://www.ruby-forum.com/t/bug-trunk-encoding-for-stdios/156309)

<div class="topic-metadata">

**Author:** [@Yugui\_SYuki\_S.S](https://www.ruby-forum.com/u/Yugui_SYuki_S.S)\
**Replies:** 10\
**Last updated:** [April 13, 2010, 5:52pm UTC](https://www.ruby-forum.com/t/bug-trunk-encoding-for-stdios/156309 "2010-04-13T17:52:31Z")

</div>

Yuguie$B$G$9!#e(B stdout, stderre$B$Ne(Bexternal encodinge$B$,e(Bnile$B$J$N$O$3$&$$$&$b$N$G$7$?$C$1e(B? default\_externale$B$r4|BT$7$F$^$7$?!#e(B e$B$=$l$+$i!“e(B-Eext:inte$B$7$?$H$-$K$O\>/$J$/$H$be(Binternal\_encodinge…

---

## [What do you use for live profiling?](https://www.ruby-forum.com/t/what-do-you-use-for-live-profiling/186862)

<div class="topic-metadata">

**Author:** [@walkins](https://www.ruby-forum.com/u/walkins)\
**Replies:** 1\
**Last updated:** [April 13, 2010, 5:22pm UTC](https://www.ruby-forum.com/t/what-do-you-use-for-live-profiling/186862 "2010-04-13T17:22:38Z")

</div>

After quite a bit of pain in dealing with EventMachine, I started my own little pet project to write an event system that plays well with others in a multithreaded environment. This has been accomplished, and so I’ve…

---

## [YAML and DateTime](https://www.ruby-forum.com/t/yaml-and-datetime/111068)

<div class="topic-metadata">

**Author:** [@Paul\_McMahon](https://www.ruby-forum.com/u/Paul_McMahon)\
**Replies:** 1\
**Last updated:** [April 13, 2010, 5:21pm UTC](https://www.ruby-forum.com/t/yaml-and-datetime/111068 "2010-04-13T17:21:15Z")

</div>

It seems that cannot store instances of DateTime, but instead stores them as Time. irb(main):001:0\> require “yaml” =\> true irb(main):003:0\> YAML.load(DateTime.now.to\_yaml).class =\> Time This causes issues when you…

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

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