# Ruby

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

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

---

## [Utility Belt: nifty gem mostly for IRB](https://www.ruby-forum.com/t/utility-belt-nifty-gem-mostly-for-irb/122853)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 15\
**Last updated:** [December 13, 2007, 7:52pm UTC](https://www.ruby-forum.com/t/utility-belt-nifty-gem-mostly-for-irb/122853 "2007-12-13T19:52:38Z")

</div>

http://utilitybelt.rubyforge.org/ Features! \* Interactively edit IRB code in your preferred text editor \* Read from and write to OS X clipboard \* Post your code to Pastie with one command (OS X only) \* Kick-ass Unix-s…

---

## [Library for backup restore mysql](https://www.ruby-forum.com/t/library-for-backup-restore-mysql/122835)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 3\
**Last updated:** [December 13, 2007, 7:29pm UTC](https://www.ruby-forum.com/t/library-for-backup-restore-mysql/122835 "2007-12-13T19:29:36Z")

</div>

hello Is there any libraries to backup and restore mysql databses. thanks

---

## [New developer looking for 101 projects](https://www.ruby-forum.com/t/new-developer-looking-for-101-projects/123054)

<div class="topic-metadata">

**Author:** [@jspencer78](https://www.ruby-forum.com/u/jspencer78)\
**Replies:** 5\
**Last updated:** [December 13, 2007, 6:57pm UTC](https://www.ruby-forum.com/t/new-developer-looking-for-101-projects/123054 "2007-12-13T18:57:51Z")

</div>

I have a background in C++ and VB from a few years back, but I’m learning Ruby and Rails for a work project. I remember back in my college days that we’d be given a project every week, and they were something very sim…

---

## [Read in file](https://www.ruby-forum.com/t/read-in-file/122969)

<div class="topic-metadata">

**Author:** [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Replies:** 10\
**Last updated:** [December 13, 2007, 6:51pm UTC](https://www.ruby-forum.com/t/read-in-file/122969 "2007-12-13T18:51:27Z")

</div>

Hi, I’ve created a simple program which will read in a file. class Reference references = ‘C:\\Documents and Settings\\Chris Davies\\Desktop\\References.rb’ f = File.open(references, ‘r’) file\_data = f.read f.close p…

---

## [Test::Unit messages](https://www.ruby-forum.com/t/test-unit-messages/123046)

<div class="topic-metadata">

**Author:** [@aidy](https://www.ruby-forum.com/u/aidy)\
**Replies:** 1\
**Last updated:** [December 13, 2007, 6:13pm UTC](https://www.ruby-forum.com/t/test-unit-messages/123046 "2007-12-13T18:13:54Z")

</div>

Hi, I would like to add additional comments to the ouput of my unit tests. For example I would link to send a description of what the test is doing to the Test::Unit output which would then be included in the ci\_rep…

---

## [While statements in ruby](https://www.ruby-forum.com/t/while-statements-in-ruby/122745)

<div class="topic-metadata">

**Author:** [@pimeamark](https://www.ruby-forum.com/u/pimeamark)\
**Replies:** 12\
**Last updated:** [December 13, 2007, 6:09pm UTC](https://www.ruby-forum.com/t/while-statements-in-ruby/122745 "2007-12-13T18:09:13Z")

</div>

Hi guys, I have a probably simple question. I dont know how to do iteration loops in ruby that reference more than one item of an array or more than one array. Here’s an example of what I would do in php. Can anyone c…

---

## [Localhost issues](https://www.ruby-forum.com/t/localhost-issues/122981)

<div class="topic-metadata">

**Author:** [@harpoon45](https://www.ruby-forum.com/u/harpoon45)\
**Replies:** 2\
**Last updated:** [December 13, 2007, 6:06pm UTC](https://www.ruby-forum.com/t/localhost-issues/122981 "2007-12-13T18:06:47Z")

</div>

I just setup ruby and was trying to run the following commands: class Story \< ActiveRecord::Base; end =\> nil story = Story.new SocketError: getaddrinfo: Name or service not known from /usr/local/lib/ruby/gems…

---

## [Workshop on Self-sustaining Systems (S3) 2008](https://www.ruby-forum.com/t/workshop-on-self-sustaining-systems-s3-2008/123052)

<div class="topic-metadata">

**Author:** [@Gregor\_Schmidt](https://www.ruby-forum.com/u/Gregor_Schmidt)\
**Replies:** 0\
**Last updated:** [December 13, 2007, 5:50pm UTC](https://www.ruby-forum.com/t/workshop-on-self-sustaining-systems-s3-2008/123052 "2007-12-13T17:50:27Z")

</div>

Hello, I know, this is slightly uncommmon in the Ruby community, but there are so many Ruby implementations out there and I am sure, somebody is interested in the topic. That is why I forward this call for papers to …

---

## [How do I convert string/text from column to hash?](https://www.ruby-forum.com/t/how-do-i-convert-string-text-from-column-to-hash/196542)

<div class="topic-metadata">

**Author:** [@malioboro](https://www.ruby-forum.com/u/malioboro)\
**Replies:** 0\
**Last updated:** [December 13, 2007, 5:38pm UTC](https://www.ruby-forum.com/t/how-do-i-convert-string-text-from-column-to-hash/196542 "2007-12-13T17:38:23Z")

</div>

Hello All… I am newb in RoR, i have problem to convert data from database to hash. Example: before I save data to MySQL DB to column ‘budget\_list’, the hash is : @market\_budget = \[\[BMW5, 2007-12-26, 30000\], \[BMW3…

---

## [Turn 0.3.0](https://www.ruby-forum.com/t/turn-0-3-0/122888)

<div class="topic-metadata">

**Author:** [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Replies:** 4\
**Last updated:** [December 13, 2007, 5:22pm UTC](https://www.ruby-forum.com/t/turn-0-3-0/122888 "2007-12-13T17:22:43Z")

</div>

Test::Unit Reporter New (turn) is a simple little gem that transforms the output of Test::Unit into something a little more verbose than just a series of dots. The name of each test case and the test being run is prin…

---

## [Refactor into a class method](https://www.ruby-forum.com/t/refactor-into-a-class-method/123043)

<div class="topic-metadata">

**Author:** [@ruby\_tl](https://www.ruby-forum.com/u/ruby_tl)\
**Replies:** 1\
**Last updated:** [December 13, 2007, 5:09pm UTC](https://www.ruby-forum.com/t/refactor-into-a-class-method/123043 "2007-12-13T17:09:09Z")

</div>

objects = \[bsn0, bsn1, bsn2, bsn3, bsn4\] search = \[“Sole Trader”\] results = objects.select do |b| match = true catch(:success) do search.each{|s| throw :success if b.my\_keywords.include?(s) } match = false end ma…

---

## [SEGV by IO.pipe](https://www.ruby-forum.com/t/segv-by-io-pipe/123044)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [December 13, 2007, 4:39pm UTC](https://www.ruby-forum.com/t/segv-by-io-pipe/123044 "2007-12-13T16:39:00Z")

</div>

e$B0J2\<$N$h$&$K$9$k$He(B SEGV e$B$7$^$9!#e(B % ./ruby -ve ’ class IO def initialize(\*x) end end IO.pipe ’ ruby 1.9.0 (2007-12-13 patchlevel 0) \[i686-linux\] -e:3: warning: method redefined; discarding old initial…

---

## [Paid tuition?](https://www.ruby-forum.com/t/paid-tuition/123015)

<div class="topic-metadata">

**Author:** [@mrjohnson](https://www.ruby-forum.com/u/mrjohnson)\
**Replies:** 2\
**Last updated:** [December 13, 2007, 4:35pm UTC](https://www.ruby-forum.com/t/paid-tuition/123015 "2007-12-13T16:35:26Z")

</div>

Hi, Iam relatively new to programming, and just began to learn Ruby and was wondering if there are any programmers here who would be up for tutoring me for a couple of hours over the internet? Ive read some of the bas…

---

## [Connecting to Outlook 'Saved Items' folder using win32ole](https://www.ruby-forum.com/t/connecting-to-outlook-saved-items-folder-using-win32ole/122930)

<div class="topic-metadata">

**Author:** [@alexd](https://www.ruby-forum.com/u/alexd)\
**Replies:** 10\
**Last updated:** [December 13, 2007, 4:31pm UTC](https://www.ruby-forum.com/t/connecting-to-outlook-saved-items-folder-using-win32ole/122930 "2007-12-13T16:31:20Z")

</div>

Can anyone tell me how to connect to the ‘Saved Items’ folder in Outlook using WIN32OLE? I can get to all the other folders using GetDefaultFolder(), but I can’t seem to get to the ‘Saved Items’ folder this way. map…

---

## [Search Array](https://www.ruby-forum.com/t/search-array/123036)

<div class="topic-metadata">

**Author:** [@ruby\_tl](https://www.ruby-forum.com/u/ruby_tl)\
**Replies:** 0\
**Last updated:** [December 13, 2007, 4:15pm UTC](https://www.ruby-forum.com/t/search-array/123036 "2007-12-13T16:15:55Z")

</div>

Hi all. I am trying to convert the folowing code into a class method. which takes two argument. ! for keywords and another for business(callection of classes). which both are arrays. And I am stack any help ? ? o…

---

## [Read write integer in binary into a file](https://www.ruby-forum.com/t/read-write-integer-in-binary-into-a-file/118317)

<div class="topic-metadata">

**Author:** [@acemtp](https://www.ruby-forum.com/u/acemtp)\
**Replies:** 9\
**Last updated:** [December 13, 2007, 2:42pm UTC](https://www.ruby-forum.com/t/read-write-integer-in-binary-into-a-file/118317 "2007-12-13T14:42:01Z")

</div>

Hello, I have some big files with lot of “unsigned int” (4 bytes) numbers and I want to read and write on these files. Currently, I found this to write: myfile \<\< \[mynum\].pack(“i”) and to read: mynum = myfile.read(…

---

## [Find the first non-nil element in an array](https://www.ruby-forum.com/t/find-the-first-non-nil-element-in-an-array/122877)

<div class="topic-metadata">

**Author:** [@lianliming](https://www.ruby-forum.com/u/lianliming)\
**Replies:** 9\
**Last updated:** [December 13, 2007, 2:31pm UTC](https://www.ruby-forum.com/t/find-the-first-non-nil-element-in-an-array/122877 "2007-12-13T14:31:25Z")

</div>

Hi all, Is there any build-in method of class Array which can be used to find the first non-nil element in an array? I can’t find any so I am trying to achieve it by my own approach. I don’t think my approach is smart …

---

## [Word Loop (#149)](https://www.ruby-forum.com/t/word-loop-149/123024)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [December 13, 2007, 2:22pm UTC](https://www.ruby-forum.com/t/word-loop-149/123024 "2007-12-13T14:22:38Z")

</div>

There were two kinds of solvers this week: hardcore programmers who love a good challenge and cheaters like me. Both approaches are neat, but I want to focus on the under appreciated cheater this time. Contrary to…

---

## [Method accesible only from another class](https://www.ruby-forum.com/t/method-accesible-only-from-another-class/123013)

<div class="topic-metadata">

**Author:** [@tcblues](https://www.ruby-forum.com/u/tcblues)\
**Replies:** 5\
**Last updated:** [December 13, 2007, 2:13pm UTC](https://www.ruby-forum.com/t/method-accesible-only-from-another-class/123013 "2007-12-13T14:13:52Z")

</div>

I need that a method can be accesible only from other class but only this method: class Nueva def metodo puts ‘metodo’ end def metodo3 puts ‘metodo3’ end private def metodo2 puts ‘metodo2’ end end class Nue…

---

## [Emulating Netcat and connecting to bind shells](https://www.ruby-forum.com/t/emulating-netcat-and-connecting-to-bind-shells/122643)

<div class="topic-metadata">

**Author:** [@Eduardo\_T](https://www.ruby-forum.com/u/Eduardo_T)\
**Replies:** 3\
**Last updated:** [December 13, 2007, 1:33pm UTC](https://www.ruby-forum.com/t/emulating-netcat-and-connecting-to-bind-shells/122643 "2007-12-13T13:33:45Z")

</div>

Hello folks, I am creating some exploits written in Ruby. Most of my payloads are TCP bind shells, Netcat works well for connecting to those bind shells. But I thought, why not connect to the shell directly from Ruby …

---

## [Swat - A todo app for Gnome](https://www.ruby-forum.com/t/swat-a-todo-app-for-gnome/123020)

<div class="topic-metadata">

**Author:** [@gnufied](https://www.ruby-forum.com/u/gnufied)\
**Replies:** 1\
**Last updated:** [December 13, 2007, 1:29pm UTC](https://www.ruby-forum.com/t/swat-a-todo-app-for-gnome/123020 "2007-12-13T13:29:04Z")

</div>

Hi Folks, Swat is a todo list manager for Gnome & Emacs. Heck : Emacs? Features: Manage your todos, add them according to priority and category. Move your todos to wish list, when not feeling like working on them. l…

---

## [OCD, end statements, and vertical space](https://www.ruby-forum.com/t/ocd-end-statements-and-vertical-space/122684)

<div class="topic-metadata">

**Author:** [@jay-levitt](https://www.ruby-forum.com/u/jay-levitt)\
**Replies:** 7\
**Last updated:** [December 13, 2007, 12:29pm UTC](https://www.ruby-forum.com/t/ocd-end-statements-and-vertical-space/122684 "2007-12-13T12:29:33Z")

</div>

I spent too many years in PL/I, where nested functions and subroutines look like this: outer: procedure (param1); declare param1 char(4); declare local char(1); put skip; put skip list (‘hello outer’); put…

---

## [Zero-copy String Handling](https://www.ruby-forum.com/t/zero-copy-string-handling/122680)

<div class="topic-metadata">

**Author:** [@curt\_s](https://www.ruby-forum.com/u/curt_s)\
**Replies:** 10\
**Last updated:** [December 13, 2007, 12:11pm UTC](https://www.ruby-forum.com/t/zero-copy-string-handling/122680 "2007-12-13T12:11:52Z")

</div>

I’m writing a C extension that involves fast scanning through and parsing of tab-delimited files. Basically, I mmap the file, figure out where the row and column boundaries are, and for each row end up with an array o…

---

## [Opposite .nil?](https://www.ruby-forum.com/t/opposite-nil/122873)

<div class="topic-metadata">

**Author:** [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Replies:** 15\
**Last updated:** [December 13, 2007, 11:57am UTC](https://www.ruby-forum.com/t/opposite-nil/122873 "2007-12-13T11:57:14Z")

</div>

I’ve looked around, but could not find a method that is the opposite of .nil?. I know there is !my\_var.nil?, but I think my\_var.exists? is more readable. I wanted to throw this out there before I added the method in …

---

## [Word Loop (#149)](https://www.ruby-forum.com/t/word-loop-149/122474)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 49\
**Last updated:** [December 13, 2007, 11:38am UTC](https://www.ruby-forum.com/t/word-loop-149/122474 "2007-12-13T11:38:27Z")

</div>

The three rules of Ruby Q.: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on this message. Support Ruby Q. by submitting ideas as often as you can: …

---

## [Expandarray may mark dirty VALUE beyond stack](https://www.ruby-forum.com/t/expandarray-may-mark-dirty-value-beyond-stack/123007)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 0\
**Last updated:** [December 13, 2007, 11:38am UTC](https://www.ruby-forum.com/t/expandarray-may-mark-dirty-value-beyond-stack/123007 "2007-12-13T11:38:26Z")

</div>

e$B1sF#$H?=$7$^$9!#e(B aaa, aab, aac, …(300 e$B8D$/$i$$e(B)…, \*zzz = 1 e$B$H$$$&B?=EBeF~$re(B GC.stress=true e$B$+$De(B Fiber e$B$NCf$G\<B9T$9$k$HMn$A$^$9!#e(B $ ./ruby -e ’ a,s=\[\],“aaa” 300.times { a\<\<s; s=s.succ } …

---

## [Rpdf2txt](https://www.ruby-forum.com/t/rpdf2txt/122725)

<div class="topic-metadata">

**Author:** [@qwerty73](https://www.ruby-forum.com/u/qwerty73)\
**Replies:** 6\
**Last updated:** [December 13, 2007, 10:22am UTC](https://www.ruby-forum.com/t/rpdf2txt/122725 "2007-12-13T10:22:47Z")

</div>

Hi to all, i’m trying to make a pdf parser. This is my code and the script seems to work… require ‘rpdf2txt/parser’ require ‘rpdf2txt/default\_handler’ parser = Rpdf2txt::Parser.new(File.read(‘filename.pdf’)) output…

---

## [Using if block\_given? method](https://www.ruby-forum.com/t/using-if-block-given-method/122786)

<div class="topic-metadata">

**Author:** [@martin\_mercy2001](https://www.ruby-forum.com/u/martin_mercy2001)\
**Replies:** 6\
**Last updated:** [December 13, 2007, 9:35am UTC](https://www.ruby-forum.com/t/using-if-block-given-method/122786 "2007-12-13T09:35:20Z")

</div>

Hi everybody, I have created a simple parser. i have used @tag method to store tag start and tag end. my requirement is how to read attributes and its values when it has more than one attributes like, This is the inp…

---

## [Ruby source code](https://www.ruby-forum.com/t/ruby-source-code/121949)

<div class="topic-metadata">

**Author:** [@mzalendo](https://www.ruby-forum.com/u/mzalendo)\
**Replies:** 1\
**Last updated:** [December 13, 2007, 8:58am UTC](https://www.ruby-forum.com/t/ruby-source-code/121949 "2007-12-13T08:58:23Z")

</div>

greetings to all, can you guys help me out in this one, how can i configure a ruby source code of a website so that it can run in my local machine? your help will be appreciated.

---

## [Korundum and threads](https://www.ruby-forum.com/t/korundum-and-threads/122968)

<div class="topic-metadata">

**Author:** [@Matthieu\_R](https://www.ruby-forum.com/u/Matthieu_R)\
**Replies:** 4\
**Last updated:** [December 13, 2007, 8:38am UTC](https://www.ruby-forum.com/t/korundum-and-threads/122968 "2007-12-13T08:38:25Z")

</div>

Hi, I’m trying to write a small daemon that would display a tray icon in the KDE task bar. The icon parts works perfectly well but starting the execution of the KDE application blocks all other threads. For example …

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

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