# Ruby

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

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

---

## [A simple newbie question (arrays and strings)](https://www.ruby-forum.com/t/a-simple-newbie-question-arrays-and-strings/138614)

<div class="topic-metadata">

**Author:** [@koichirose](https://www.ruby-forum.com/u/koichirose)\
**Replies:** 12\
**Last updated:** [May 27, 2008, 7:40pm UTC](https://www.ruby-forum.com/t/a-simple-newbie-question-arrays-and-strings/138614 "2008-05-27T19:40:57Z")

</div>

Today I started programming in ruby. Here’s what I managed to do so far: string = Dir.entries(".") string.delete\_at(0) string.delete\_at(0) I get a list of files 2-3. I delete the first two elements (’.’ and ‘…’) N…

---

## [Problem reading small files - stringio problem?](https://www.ruby-forum.com/t/problem-reading-small-files-stringio-problem/138752)

<div class="topic-metadata">

**Author:** [@Singeo](https://www.ruby-forum.com/u/Singeo)\
**Replies:** 3\
**Last updated:** [May 27, 2008, 6:28pm UTC](https://www.ruby-forum.com/t/problem-reading-small-files-stringio-problem/138752 "2008-05-27T18:28:10Z")

</div>

Hi, I wonder if someone can take a quick look at this code and tell me where I’m going wrong. The small files (less than 20k?) that I read in this array are not appearing in the output file. I understand this is a pro…

---

## [Code Review: WEBrick](https://www.ruby-forum.com/t/code-review-webrick/138579)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 6\
**Last updated:** [May 27, 2008, 6:23pm UTC](https://www.ruby-forum.com/t/code-review-webrick/138579 "2008-05-27T18:23:26Z")

</div>

tfpt review “/shelveset:WEBrick;REDMOND\\tomat” Implements IO.select, String#to\_f, Thread#kill, Thread#start, Thread#inspect, fixes TCPServer, File::Constants, and some other minor fixes. Tomas

---

## [How to catch STDIO STREAM?](https://www.ruby-forum.com/t/how-to-catch-stdio-stream/138699)

<div class="topic-metadata">

**Author:** [@cheyne](https://www.ruby-forum.com/u/cheyne)\
**Replies:** 6\
**Last updated:** [May 27, 2008, 5:45pm UTC](https://www.ruby-forum.com/t/how-to-catch-stdio-stream/138699 "2008-05-27T17:45:35Z")

</div>

Hi, there How can I capture a error massage from the STD IO? For instance, I have a program call foo.exe and i run the program ./foo.exe Then the program prints out some error messages. How can I write a script that…

---

## [Directionality of comparasion operators](https://www.ruby-forum.com/t/directionality-of-comparasion-operators/138751)

<div class="topic-metadata">

**Author:** [@polarapfel](https://www.ruby-forum.com/u/polarapfel)\
**Replies:** 10\
**Last updated:** [May 27, 2008, 5:32pm UTC](https://www.ruby-forum.com/t/directionality-of-comparasion-operators/138751 "2008-05-27T17:32:03Z")

</div>

Hi, maths says that the value of expressions like x == y and y == x is always equal. And indeed most programmers wouldn’t think twice about using x \< y instead of y \> x (except maybe those versed in machine language……

---

## [SEGV 2008-05-27 revision 16652](https://www.ruby-forum.com/t/segv-2008-05-27-revision-16652/138773)

<div class="topic-metadata">

**Author:** [@WATANABE\_Tetsuya](https://www.ruby-forum.com/u/WATANABE_Tetsuya)\
**Replies:** 0\
**Last updated:** [May 27, 2008, 4:49pm UTC](https://www.ruby-forum.com/t/segv-2008-05-27-revision-16652/138773 "2008-05-27T16:49:23Z")

</div>

e$BEOJUE/Li$G$9!#e(B ruby 1.9.0 (2008-05-27 revision 16652) \[i686-linux\] e$B$G$9!#e(B SEGV e$B$Ge(B core e$B$7$^$9!#e(B e$B%9%/%j%W%H$K$D$$$F$O!"JQ?te(B l e$B$KBeF~$7$J$$$H5/$-$J$+$C$?$j!"e(BNKF.nkf e$B$Ne(B e$BLa$…

---

## [How to model something](https://www.ruby-forum.com/t/how-to-model-something/138548)

<div class="topic-metadata">

**Author:** [@polarapfel](https://www.ruby-forum.com/u/polarapfel)\
**Replies:** 7\
**Last updated:** [May 27, 2008, 4:25pm UTC](https://www.ruby-forum.com/t/how-to-model-something/138548 "2008-05-27T16:25:43Z")

</div>

Hi, my programm needs to store persons. They have a weight and a gender. You are only allowed to ask males for their weight, females will throw dishes/exceptions. There is a method to change someones gender. I could …

---

## [Ruby with Power over Ethernet (PoE) camera](https://www.ruby-forum.com/t/ruby-with-power-over-ethernet-poe-camera/138764)

<div class="topic-metadata">

**Author:** [@fmpfmpf](https://www.ruby-forum.com/u/fmpfmpf)\
**Replies:** 0\
**Last updated:** [May 27, 2008, 3:41pm UTC](https://www.ruby-forum.com/t/ruby-with-power-over-ethernet-poe-camera/138764 "2008-05-27T15:41:07Z")

</div>

i want to program a GUI for this camera http://www.smartnd.com/sites/products/smart\_cams/ the GUI will show what is being viewed by the camera. basically a video. Can Ruby do it? If yes, could you pls give me some g…

---

## [Pushed a new beta of PickAxe 3](https://www.ruby-forum.com/t/pushed-a-new-beta-of-pickaxe-3/132411)

<div class="topic-metadata">

**Author:** [@dirtytree](https://www.ruby-forum.com/u/dirtytree)\
**Replies:** 9\
**Last updated:** [May 27, 2008, 3:30pm UTC](https://www.ruby-forum.com/t/pushed-a-new-beta-of-pickaxe-3/132411 "2008-05-27T15:30:38Z")

</div>

I’ve just finished a first pass through the built-in library reference for the third edition of the PickAxe. Totting up the numbers, I see 6 more classes and something like 200 new methods. A boatload of the existing …

---

## [Interrupt while raising an exception terminates the program with no error print](https://www.ruby-forum.com/t/interrupt-while-raising-an-exception-terminates-the-program-with-no-error-print/138667)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 1\
**Last updated:** [May 27, 2008, 3:13pm UTC](https://www.ruby-forum.com/t/interrupt-while-raising-an-exception-terminates-the-program-with-no-error-print/138667 "2008-05-27T15:13:27Z")

</div>

e$B1sF#$G$9!#e(B raise e$B\<B9TCf$Ke(B SIGINT e$B$G3d$j9~$s$@$H$-!"9b3NN($G2?$b8@$o$:$Ke(B e$B0\[\>o=\*N;$7$^$9!#e(B $ ./ruby -ve ‘begin; raise; rescue; retry; end’ ruby 1.9.0 (2008-05-26 revision 16615) \[i686-linux\] ^C …

---

## [Duke & Ruby - picture + wallpaper](https://www.ruby-forum.com/t/duke-ruby-picture-wallpaper/138531)

<div class="topic-metadata">

**Author:** [@radarek](https://www.ruby-forum.com/u/radarek)\
**Replies:** 3\
**Last updated:** [May 27, 2008, 1:54pm UTC](https://www.ruby-forum.com/t/duke-ruby-picture-wallpaper/138531 "2008-05-27T13:54:16Z")

</div>

I made some images and wallpaper with Ruby & Duke motive and I want to share with you. I know that one of my images (made few months ago) is used by Charles & Thomas in presentation slides so maybe they would like use…

---

## [TCP Server/GServer](https://www.ruby-forum.com/t/tcp-server-gserver/138536)

<div class="topic-metadata">

**Author:** [@ribes](https://www.ruby-forum.com/u/ribes)\
**Replies:** 4\
**Last updated:** [May 27, 2008, 1:41pm UTC](https://www.ruby-forum.com/t/tcp-server-gserver/138536 "2008-05-27T13:41:45Z")

</div>

Team, Let me begin by stating that I am still a Ruby novice, although I’ve written some simple appls (sudoku, TCP and UDP servers and other mundane appls) with the input of the team. I worked with AIX and I support…

---

## [Railsy Question about redefining ruby methods](https://www.ruby-forum.com/t/railsy-question-about-redefining-ruby-methods/138533)

<div class="topic-metadata">

**Author:** [@Xeno\_C](https://www.ruby-forum.com/u/Xeno_C)\
**Replies:** 8\
**Last updated:** [May 27, 2008, 1:40pm UTC](https://www.ruby-forum.com/t/railsy-question-about-redefining-ruby-methods/138533 "2008-05-27T13:40:34Z")

</div>

Please this is a Ruby question, not, at least as the main focus, a rails one, as you’ll see if you read all the way through. Say, I’ve got a case in Rails where I want all my links to be prepended with something like …

---

## [Ruby lookups(=python dict)?](https://www.ruby-forum.com/t/ruby-lookups-python-dict/138709)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 4\
**Last updated:** [May 27, 2008, 1:24pm UTC](https://www.ruby-forum.com/t/ruby-lookups-python-dict/138709 "2008-05-27T13:24:36Z")

</div>

what is the easiest way for a dict like in python? are there hash tables?

---

## [The creator of Ruby explains why Ruby sucks](https://www.ruby-forum.com/t/the-creator-of-ruby-explains-why-ruby-sucks/138726)

<div class="topic-metadata">

**Author:** [@S2S2S2](https://www.ruby-forum.com/u/S2S2S2)\
**Replies:** 3\
**Last updated:** [May 27, 2008, 11:27am UTC](https://www.ruby-forum.com/t/the-creator-of-ruby-explains-why-ruby-sucks/138726 "2008-05-27T11:27:54Z")

</div>

http://www.rubyist.net/~matz/slides/rc2003/index.html http://news.ycombinator.com/

---

## [EXIF Library](https://www.ruby-forum.com/t/exif-library/96033)

<div class="topic-metadata">

**Author:** [@kusako](https://www.ruby-forum.com/u/kusako)\
**Replies:** 27\
**Last updated:** [May 27, 2008, 11:16am UTC](https://www.ruby-forum.com/t/exif-library/96033 "2008-05-27T11:16:35Z")

</div>

Hi- does anyone know of a working EXIF library for Ruby that runs on Windows and Linux? So far I’ve tried rexif and ruby-exif without any success. RMagick (RMagick-1.9.2-IM-6.2.4-6-win32) returns some data, but adds …

---

## [Code Review: PackIntegers](https://www.ruby-forum.com/t/code-review-packintegers/138729)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [May 27, 2008, 9:29am UTC](https://www.ruby-forum.com/t/code-review-packintegers/138729 "2008-05-27T09:29:14Z")

</div>

tfpt review “/shelveset:PackIntegers;REDMOND\\tomat” Implements integer packing directives. (Typo in shelveset name in the previous email.) Tomas

---

## [Code Review: PackInteger](https://www.ruby-forum.com/t/code-review-packinteger/138728)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [May 27, 2008, 9:19am UTC](https://www.ruby-forum.com/t/code-review-packinteger/138728 "2008-05-27T09:19:50Z")

</div>

tfpt review “/shelveset:PackInteger;REDMOND\\tomat” Implements integer packing directives. Tomas

---

## [String+char, cant convert nil, but not nil](https://www.ruby-forum.com/t/string-char-cant-convert-nil-but-not-nil/138716)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [May 27, 2008, 6:58am UTC](https://www.ruby-forum.com/t/string-char-cant-convert-nil-but-not-nil/138716 "2008-05-27T06:58:53Z")

</div>

tryong to do a ROT13(ROT13 - Wikipedia) encrypter/ decrypter. x = “ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz” y = “NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm” arr = x.split(//).zip(y.split(//)) …

---

## [Question on OpenURI](https://www.ruby-forum.com/t/question-on-openuri/138717)

<div class="topic-metadata">

**Author:** [@Srijayanth\_S](https://www.ruby-forum.com/u/Srijayanth_S)\
**Replies:** 2\
**Last updated:** [May 27, 2008, 6:52am UTC](https://www.ruby-forum.com/t/question-on-openuri/138717 "2008-05-27T06:52:27Z")

</div>

Hello, For the following piece of code: #! /usr/bin/ruby require ‘open-uri’ require ‘rexml/document’ require ‘rexml/xpath’ doc1 = open(“Cricinfo Live Scores”) puts doc1.class doc2 = open(“http://ws.audioscrobble…

---

## [A problem ask for help](https://www.ruby-forum.com/t/a-problem-ask-for-help/138715)

<div class="topic-metadata">

**Author:** [@smellcode](https://www.ruby-forum.com/u/smellcode)\
**Replies:** 0\
**Last updated:** [May 27, 2008, 6:30am UTC](https://www.ruby-forum.com/t/a-problem-ask-for-help/138715 "2008-05-27T06:30:11Z")

</div>

require ‘json’ JSON generator escape all non-ASCII an control characters with \\uXXXX escape sequences so my string a = ‘æˆ‘ä»¬’

---

## [Code Review: rails-12](https://www.ruby-forum.com/t/code-review-rails-12/138708)

<div class="topic-metadata">

**Author:** [@John\_LSSIRONRUBY](https://www.ruby-forum.com/u/John_LSSIRONRUBY)\
**Replies:** 1\
**Last updated:** [May 27, 2008, 6:09am UTC](https://www.ruby-forum.com/t/code-review-rails-12/138708 "2008-05-27T06:09:42Z")

</div>

tfpt review “/shelveset:rails-12;REDMOND\\jflam” Adds an implementation of Kernel#rand. Passes all specs Fixes bug where you are matching a regex against a nil (both #match and #=~) Fixes glob for matching directory na…

---

## [Make hashtable out of 2 strings](https://www.ruby-forum.com/t/make-hashtable-out-of-2-strings/138711)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [May 27, 2008, 4:55am UTC](https://www.ruby-forum.com/t/make-hashtable-out-of-2-strings/138711 "2008-05-27T04:55:59Z")

</div>

i have 2 strings, i want to take for each char in string1 the same indexed char in string2 and make them into a key-\>value pair. how can i iterate a string?

---

## [Wmi problem](https://www.ruby-forum.com/t/wmi-problem/138674)

<div class="topic-metadata">

**Author:** [@nimrod\_cohen](https://www.ruby-forum.com/u/nimrod_cohen)\
**Replies:** 1\
**Last updated:** [May 27, 2008, 12:10am UTC](https://www.ruby-forum.com/t/wmi-problem/138674 "2008-05-27T00:10:20Z")

</div>

hi i need to execute a remote command on windows machine using ruby my env is windows xp what ruby method/packet should i use ? example will really help thanks nimrod

---

## [Problem accessing hash table](https://www.ruby-forum.com/t/problem-accessing-hash-table/138700)

<div class="topic-metadata">

**Author:** [@anukulsinghal](https://www.ruby-forum.com/u/anukulsinghal)\
**Replies:** 1\
**Last updated:** [May 26, 2008, 11:57pm UTC](https://www.ruby-forum.com/t/problem-accessing-hash-table/138700 "2008-05-26T23:57:24Z")

</div>

Hi, I am facing the following problem, when using the following code snippet: c = \[\] c.push({:name =\> ‘xyz’, :class =\> ‘m70’, :title =\> ‘yes’}) Now, puts c gives me the output as classm70namexyztitleyes My Aim is t…

---

## [Newby goldspike on JBoss problem](https://www.ruby-forum.com/t/newby-goldspike-on-jboss-problem/138478)

<div class="topic-metadata">

**Author:** [@Jonathan\_OSConnor](https://www.ruby-forum.com/u/Jonathan_OSConnor)\
**Replies:** 13\
**Last updated:** [May 26, 2008, 11:26pm UTC](https://www.ruby-forum.com/t/newby-goldspike-on-jboss-problem/138478 "2008-05-26T23:26:57Z")

</div>

Hi, I am trying to get a sample Rails app running on JBoss. My Rails app “test” has a single controller “sample” with an action “list”. I’m running NetBeans 6.1 with JRuby 1.1 and Rails 2.0.2. I generated a standalo…

---

## [IRB output format in YAML](https://www.ruby-forum.com/t/irb-output-format-in-yaml/138672)

<div class="topic-metadata">

**Author:** [@martinos](https://www.ruby-forum.com/u/martinos)\
**Replies:** 2\
**Last updated:** [May 26, 2008, 11:19pm UTC](https://www.ruby-forum.com/t/irb-output-format-in-yaml/138672 "2008-05-26T23:19:33Z")

</div>

I there a way to configure IRB so that it always display the result of a IRB command in YAML or PP format. Example: In YAML: irb(main):011:0\> ENV.keys ALLUSERSPROFILE APPDATA APR\_ICONV\_PATH ATI\_PATH BERK\_PATH CLASSP…

---

## [JRuby InfoQ Article](https://www.ruby-forum.com/t/jruby-infoq-article/138630)

<div class="topic-metadata">

**Author:** [@ghoti143](https://www.ruby-forum.com/u/ghoti143)\
**Replies:** 1\
**Last updated:** [May 26, 2008, 9:24pm UTC](https://www.ruby-forum.com/t/jruby-infoq-article/138630 "2008-05-26T21:24:22Z")

</div>

BTW, we did a press release last week on the announcement of an application built with JRuby. This resulted in an interview from InfoQ on our use of JRuby. Real world JRuby on Rails: Infectious disease reporting and m…

---

## [Executing javascript from Ruby](https://www.ruby-forum.com/t/executing-javascript-from-ruby/138527)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [May 26, 2008, 8:14pm UTC](https://www.ruby-forum.com/t/executing-javascript-from-ruby/138527 "2008-05-26T20:14:44Z")

</div>

I need to execute a javascript from Ruby. The result of the javascript is a URL. I could not find anything that help bridge the gap between javascript and Ruby. Does anyone know if there is something that I can use fo…

---

## [Ruby book for DRb, SOAP and friends](https://www.ruby-forum.com/t/ruby-book-for-drb-soap-and-friends/138625)

<div class="topic-metadata">

**Author:** [@Saji\_NSHameed](https://www.ruby-forum.com/u/Saji_NSHameed)\
**Replies:** 7\
**Last updated:** [May 26, 2008, 8:04pm UTC](https://www.ruby-forum.com/t/ruby-book-for-drb-soap-and-friends/138625 "2008-05-26T20:04:44Z")

</div>

Dear List, Any recommendations for a Ruby book that has substantial coverage on DRb, SOAP and such similar functions that may aid distributed computing. I understand that books such as “Ruby Way \[Hal F.\]”, “Ruby Deve…

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

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