# Ruby

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

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

---

## [Socket test](https://www.ruby-forum.com/t/socket-test/137150)

<div class="topic-metadata">

**Author:** [@C.JSAdams-Collier](https://www.ruby-forum.com/u/C.JSAdams-Collier)\
**Replies:** 1\
**Last updated:** [May 9, 2008, 1:39pm UTC](https://www.ruby-forum.com/t/socket-test/137150 "2008-05-09T13:39:22Z")

</div>

Here’s a test of the socket patch from Mono at r100: cjcollier@karma:/usr/src/svn/rubyforge.org/ironruby/trunk/tests/ ironruby$ cat socket-test.rb && echo ‘===’ && ruby socket-test.rb require ‘socket’ streamSock = TC…

---

## [Doing an AND in regexp char class](https://www.ruby-forum.com/t/doing-an-and-in-regexp-char-class/137105)

<div class="topic-metadata">

**Author:** [@toadkicker](https://www.ruby-forum.com/u/toadkicker)\
**Replies:** 17\
**Last updated:** [May 9, 2008, 12:02pm UTC](https://www.ruby-forum.com/t/doing-an-and-in-regexp-char-class/137105 "2008-05-09T12:02:04Z")

</div>

This question arises out of a couple of recent threads and may or may not be a Ruby-specific question. I can check with a character class if one of the characters in the class exists or does not exist, but can I use a…

---

## [Why can't I redefine "\<\<" method to allow two parameters?](https://www.ruby-forum.com/t/why-cant-i-redefine-method-to-allow-two-parameters/137041)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 13\
**Last updated:** [May 9, 2008, 8:41am UTC](https://www.ruby-forum.com/t/why-cant-i-redefine-method-to-allow-two-parameters/137041 "2008-05-09T08:41:50Z")

</div>

Hi, very exrtange: class MyArray \< Array alias original\_add \<\< def \<\<(n,k) original\_add “#{n}: #{k}” end end my\_array = MyArray.new =\> \[\] my\_array \<\< (“Header”, “Value”) SyntaxError: compile error (irb):25: sy…

---

## [Reverse Divisible Numbers (#161)](https://www.ruby-forum.com/t/reverse-divisible-numbers-161/136491)

<div class="topic-metadata">

**Author:** [@mansfiem](https://www.ruby-forum.com/u/mansfiem)\
**Replies:** 34\
**Last updated:** [May 9, 2008, 6:40am UTC](https://www.ruby-forum.com/t/reverse-divisible-numbers-161/136491 "2008-05-09T06:40:26Z")

</div>

This is a fairly simple quiz this week, as I’m in the middle of putting together a new website to replace the existing RQ2 website, which was supposed to be temporary. Hopefully the new one should be in place next wee…

---

## [Reverse Divisible Numbers (#161)](https://www.ruby-forum.com/t/reverse-divisible-numbers-161/137084)

<div class="topic-metadata">

**Author:** [@mansfiem](https://www.ruby-forum.com/u/mansfiem)\
**Replies:** 1\
**Last updated:** [May 9, 2008, 5:25am UTC](https://www.ruby-forum.com/t/reverse-divisible-numbers-161/137084 "2008-05-09T05:25:37Z")

</div>

NOTE: I haven’t updated the current (temporary) website, as I’m just about done with the first rev of a new (temporary) website. The new website is still not quite where I want it to be, but far more maintainable than…

---

## [HI.How to install instal qtruby4-1.4.9-mswin32.gem with gem?](https://www.ruby-forum.com/t/hi-how-to-install-instal-qtruby4-1-4-9-mswin32-gem-with-gem/137121)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [May 9, 2008, 3:55am UTC](https://www.ruby-forum.com/t/hi-how-to-install-instal-qtruby4-1-4-9-mswin32-gem-with-gem/137121 "2008-05-09T03:55:27Z")

</div>

HI: i want to use qtruby.how to install?i try type “gem insall qtruby…”,it give me “ERROR: Error installing gem qtruby4-1.4.9- mswin32.gem\[.gem\]: buffer error”

---

## [How call scripts in windows using something like 'nohup' in linux](https://www.ruby-forum.com/t/how-call-scripts-in-windows-using-something-like-nohup-in-linux/137074)

<div class="topic-metadata">

**Author:** [@Pablo\_QSAhora\_en](https://www.ruby-forum.com/u/Pablo_QSAhora_en)\
**Replies:** 2\
**Last updated:** [May 9, 2008, 3:02am UTC](https://www.ruby-forum.com/t/how-call-scripts-in-windows-using-something-like-nohup-in-linux/137074 "2008-05-09T03:02:31Z")

</div>

Hi, I came from linux into windows, I was calling all scripts using ‘nohup’ linux command. I’m trying to port several scripts to windows service but I can’t call them if they use ‘puts’. So I was thinking in some way…

---

## [Code Review: Reflection](https://www.ruby-forum.com/t/code-review-reflection/137087)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 2\
**Last updated:** [May 9, 2008, 2:28am UTC](https://www.ruby-forum.com/t/code-review-reflection/137087 "2008-05-09T02:28:56Z")

</div>

tfpt review /shelveset:Reflection;REDMOND\\tomat Removes singleton classes from Module#ancestors return value to match MRI. Implements Kernel#extend, Kernel#singleton\_methods, Module#extended and Module#extend\_object. …

---

## [Qt ruby gem install on windows xp](https://www.ruby-forum.com/t/qt-ruby-gem-install-on-windows-xp/137103)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [May 9, 2008, 1:57am UTC](https://www.ruby-forum.com/t/qt-ruby-gem-install-on-windows-xp/137103 "2008-05-09T01:57:19Z")

</div>

I was looking forward to trying Ruby with qt - it seems a great combination. I installed Ruby on a windows XP machine using the ruby one click installer (1.8.6-26). I then downloaded the qtruby4-1.4.9-mswin32.gem an…

---

## [Re: Code Review: bugfixes-7](https://www.ruby-forum.com/t/re-code-review-bugfixes-7/137114)

<div class="topic-metadata">

**Author:** [@ksunair](https://www.ruby-forum.com/u/ksunair)\
**Replies:** 0\
**Last updated:** [May 9, 2008, 1:43am UTC](https://www.ruby-forum.com/t/re-code-review-bugfixes-7/137114 "2008-05-09T01:43:52Z")

</div>

Hi john, I implemented both basename and file as well. But I will build a patch without those two in it after getting your update. Thanks. On May 8, 2008, at 3:37 PM, “John L. (IRONRUBY)” removed\_email\_address@domain…

---

## [RMagick 1.15.14](https://www.ruby-forum.com/t/rmagick-1-15-14/137113)

<div class="topic-metadata">

**Author:** [@timhunter](https://www.ruby-forum.com/u/timhunter)\
**Replies:** 0\
**Last updated:** [May 9, 2008, 12:36am UTC](https://www.ruby-forum.com/t/rmagick-1-15-14/137113 "2008-05-09T00:36:31Z")

</div>

I’ve just uploaded RMagick 1.15.14 to RubyForge. This release adds support for GraphicsMagick 1.2.1, the latest release of GraphicsMagick. This is the 14th update to RMagick 1 since January 2007. RMagick 1.15.14 work…

---

## [Scramble sentence, how to better program?](https://www.ruby-forum.com/t/scramble-sentence-how-to-better-program/137091)

<div class="topic-metadata">

**Author:** [@globalrev](https://www.ruby-forum.com/u/globalrev)\
**Replies:** 9\
**Last updated:** [May 9, 2008, 12:25am UTC](https://www.ruby-forum.com/t/scramble-sentence-how-to-better-program/137091 "2008-05-09T00:25:56Z")

</div>

i have written a program that takes a sentence as input and outputs the sentence with the words rearranged. it is probably inefficient and can probably be done with less code. it is also nondeterministic( while (inLi…

---

## [Ruby Quiz 2.0 new location](https://www.ruby-forum.com/t/ruby-quiz-2-0-new-location/137108)

<div class="topic-metadata">

**Author:** [@mansfiem](https://www.ruby-forum.com/u/mansfiem)\
**Replies:** 0\
**Last updated:** [May 9, 2008, 12:01am UTC](https://www.ruby-forum.com/t/ruby-quiz-2-0-new-location/137108 "2008-05-09T00:01:19Z")

</div>

I’ve moved the temporary Ruby Q. 2.0 stuff to a new, less-temporary location: \<http://www.splatbang.com/rubyquiz/\> It still ain’t the prettiest thing (I’m a coder, dammit, not a graphic designer!)… but it’s certainly…

---

## [Hoe and multiple gems](https://www.ruby-forum.com/t/hoe-and-multiple-gems/137106)

<div class="topic-metadata">

**Author:** [@Vassilis\_R](https://www.ruby-forum.com/u/Vassilis_R)\
**Replies:** 0\
**Last updated:** [May 8, 2008, 11:49pm UTC](https://www.ruby-forum.com/t/hoe-and-multiple-gems/137106 "2008-05-08T23:49:35Z")

</div>

I have a few plugins/extra features I’d like to offer as separate gems. And I would like to keep the convenience of Hoe’s “rake release” Is there a way for Hoe to create and release more than one gem or will I have to…

---

## [Wired result](https://www.ruby-forum.com/t/wired-result/137095)

<div class="topic-metadata">

**Author:** [@cheyne](https://www.ruby-forum.com/u/cheyne)\
**Replies:** 4\
**Last updated:** [May 8, 2008, 11:46pm UTC](https://www.ruby-forum.com/t/wired-result/137095 "2008-05-08T23:46:52Z")

</div>

Hey, guys. I’m a new ruby learner. I’m so stuck on the regular expression part. The following code is a fuction that passed in 2 strings: ftarget, which is the location of a file to read; fkey is the key to match in t…

---

## [Error when starting the server](https://www.ruby-forum.com/t/error-when-starting-the-server/137056)

<div class="topic-metadata">

**Author:** [@cornelombaard](https://www.ruby-forum.com/u/cornelombaard)\
**Replies:** 2\
**Last updated:** [May 8, 2008, 11:18pm UTC](https://www.ruby-forum.com/t/error-when-starting-the-server/137056 "2008-05-08T23:18:45Z")

</div>

I get the following when I want to start the rails server: Server Error: Address already in use - bind(2) /usr/lib/ruby/1.8/webrick/utils.rb:73:in \`initialize’: Address already in use - bind(2) (Errno::EADDRINUSE)

---

## [Re: TDD in coding!](https://www.ruby-forum.com/t/re-tdd-in-coding/137098)

<div class="topic-metadata">

**Author:** [@ksunair](https://www.ruby-forum.com/u/ksunair)\
**Replies:** 0\
**Last updated:** [May 8, 2008, 10:57pm UTC](https://www.ruby-forum.com/t/re-tdd-in-coding/137098 "2008-05-08T22:57:50Z")

</div>

I will do that. Thanks. ----- Original Message ---- From: John L. (IRONRUBY) removed\_email\_address@domain.invalid To: “removed\_email\_address@domain.invalid” removed\_email\_address@domain.invalid Sent: Thursday, May 8…

---

## [Code Review: bugfixes-7](https://www.ruby-forum.com/t/code-review-bugfixes-7/137100)

<div class="topic-metadata">

**Author:** [@John\_LSSIRONRUBY](https://www.ruby-forum.com/u/John_LSSIRONRUBY)\
**Replies:** 0\
**Last updated:** [May 8, 2008, 10:56pm UTC](https://www.ruby-forum.com/t/code-review-bugfixes-7/137100 "2008-05-08T22:56:04Z")

</div>

tfpt review /shelveset:bugfixes-7;REDMOND\\jflam Ruby only This shelveset fixes a number of open bugs on Rubyforge and adds some features that we need to get the latest rubinius specs running. MatchDataOps: we us…

---

## [Write Ruby code sentences](https://www.ruby-forum.com/t/write-ruby-code-sentences/137097)

<div class="topic-metadata">

**Author:** [@sandro\_p](https://www.ruby-forum.com/u/sandro_p)\
**Replies:** 0\
**Last updated:** [May 8, 2008, 10:54pm UTC](https://www.ruby-forum.com/t/write-ruby-code-sentences/137097 "2008-05-08T22:54:53Z")

</div>

Have you ever tried to write phrases in ruby code ? I do :smiley: It’s quite fun, there are two rules: use as fewer strings as possible create runnable code Here’s a sample “code”.is\_a?(String).to\_a \<\< “RT” #code i…

---

## [Jruby Marshal/IO.eof bug?](https://www.ruby-forum.com/t/jruby-marshal-io-eof-bug/136875)

<div class="topic-metadata">

**Author:** [@Chris\_Goard](https://www.ruby-forum.com/u/Chris_Goard)\
**Replies:** 1\
**Last updated:** [May 8, 2008, 10:49pm UTC](https://www.ruby-forum.com/t/jruby-marshal-io-eof-bug/136875 "2008-05-08T22:49:35Z")

</div>

The following code seems to work in MRI, but not in jruby: File.open("/tmp/foo", “w”) do |f| Marshal.dump(“hey”, f) Marshal.dump(“there”, f) end File.open("/tmp/foo", “r”) do |f| puts Marshal.load(f) puts Marshal.…

---

## [Re: TDD in coding!](https://www.ruby-forum.com/t/re-tdd-in-coding/137086)

<div class="topic-metadata">

**Author:** [@ksunair](https://www.ruby-forum.com/u/ksunair)\
**Replies:** 1\
**Last updated:** [May 8, 2008, 10:18pm UTC](https://www.ruby-forum.com/t/re-tdd-in-coding/137086 "2008-05-08T22:18:57Z")

</div>

Thanks, How do I go about sending the code changes I made? I would like to submit a small changes first and get the feedback and then I can go full blown development. I just finished 10 functions that passed my full t…

---

## [QtRuby: get data from TableWidget](https://www.ruby-forum.com/t/qtruby-get-data-from-tablewidget/137072)

<div class="topic-metadata">

**Author:** [@bizzz](https://www.ruby-forum.com/u/bizzz)\
**Replies:** 2\
**Last updated:** [May 8, 2008, 9:49pm UTC](https://www.ruby-forum.com/t/qtruby-get-data-from-tablewidget/137072 "2008-05-08T21:49:11Z")

</div>

Hello! I’ve started learning QtRuby few days ago so I’ve got newbie question (not answered by google, though): There is Qt::TableWidget which I want to use to get data from user. The question is: how to get all data …

---

## [Windows prompt, how to write?](https://www.ruby-forum.com/t/windows-prompt-how-to-write/137088)

<div class="topic-metadata">

**Author:** [@globalrev](https://www.ruby-forum.com/u/globalrev)\
**Replies:** 1\
**Last updated:** [May 8, 2008, 9:25pm UTC](https://www.ruby-forum.com/t/windows-prompt-how-to-write/137088 "2008-05-08T21:25:54Z")

</div>

using the ruby prompt in windows, how do i write \[ \]? altgr+8 doesnt work…

---

## [A computer science book to learn about interpreter, VM etc](https://www.ruby-forum.com/t/a-computer-science-book-to-learn-about-interpreter-vm-etc/137034)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 4\
**Last updated:** [May 8, 2008, 8:42pm UTC](https://www.ruby-forum.com/t/a-computer-science-book-to-learn-about-interpreter-vm-etc/137034 "2008-05-08T20:42:02Z")

</div>

I learned HTML and then I learned programming. Have been a JAVA programmer for a bunch of years and now I have been working on Rails for more than six months. Never worked on C though. I am having trouble understandin…

---

## [SVN head compilation problem](https://www.ruby-forum.com/t/svn-head-compilation-problem/136966)

<div class="topic-metadata">

**Author:** [@Antti\_Karanta](https://www.ruby-forum.com/u/Antti_Karanta)\
**Replies:** 2\
**Last updated:** [May 8, 2008, 8:31pm UTC](https://www.ruby-forum.com/t/svn-head-compilation-problem/136966 "2008-05-08T20:31:23Z")

</div>

Hi! I’m having trouble compiling on svn head: antti@tylypahka:~/work/jruby$ ant clean jar-complete Buildfile: build.xml init: clean: \[delete\] Deleting directory /home/antti/work/jruby/docs/api \[delete\] Deleting di…

---

## [Writing a SQL Query in Active Record?](https://www.ruby-forum.com/t/writing-a-sql-query-in-active-record/137065)

<div class="topic-metadata">

**Author:** [@anukulsinghal](https://www.ruby-forum.com/u/anukulsinghal)\
**Replies:** 5\
**Last updated:** [May 8, 2008, 8:16pm UTC](https://www.ruby-forum.com/t/writing-a-sql-query-in-active-record/137065 "2008-05-08T20:16:40Z")

</div>

Hi, I am using the following code snippet for connecting to SQL Server through Active Record: require ‘rubygems’ require ‘active\_record’ ActiveRecord::Base.establish\_connection( :adapter =\> “sqlserver”, :host =\> “…

---

## [Rails 2.0 & helpers](https://www.ruby-forum.com/t/rails-2-0-helpers/137071)

<div class="topic-metadata">

**Author:** [@John\_Woodward](https://www.ruby-forum.com/u/John_Woodward)\
**Replies:** 1\
**Last updated:** [May 8, 2008, 7:45pm UTC](https://www.ruby-forum.com/t/rails-2-0-helpers/137071 "2008-05-08T19:45:23Z")

</div>

I don’t know if this is a JRuby specific issue, or just a general issue with Rails. I have 2 controllers, say, “A”, and “B”. Associated with this, then, are 2 views, as well as 2 helpers. Is it possible to have a h…

---

## [Checking connection to server:port \[socket\]](https://www.ruby-forum.com/t/checking-connection-to-server-port-socket/134824)

<div class="topic-metadata">

**Author:** [@kristis](https://www.ruby-forum.com/u/kristis)\
**Replies:** 16\
**Last updated:** [May 8, 2008, 7:35pm UTC](https://www.ruby-forum.com/t/checking-connection-to-server-port-socket/134824 "2008-05-08T19:35:21Z")

</div>

hi, I have been googling for about two hours to solve problem with sockets connect method. I need to check connection to server www.example.com:xxxx (UDP) but the problem is that the answer (connected, refused or smt…

---

## [Event handling](https://www.ruby-forum.com/t/event-handling/136840)

<div class="topic-metadata">

**Author:** [@deadinplastic](https://www.ruby-forum.com/u/deadinplastic)\
**Replies:** 4\
**Last updated:** [May 8, 2008, 6:49pm UTC](https://www.ruby-forum.com/t/event-handling/136840 "2008-05-08T18:49:54Z")

</div>

Hi, Does ruby has some standard event handling functionality? I’ve searched google and the “Programming Ruby book” but it appears there isn’t much info on event handling, so maybe it is named differently in ruby?

---

## [Forgetting MutableString](https://www.ruby-forum.com/t/forgetting-mutablestring/137043)

<div class="topic-metadata">

**Author:** [@editkid](https://www.ruby-forum.com/u/editkid)\
**Replies:** 7\
**Last updated:** [May 8, 2008, 6:31pm UTC](https://www.ruby-forum.com/t/forgetting-mutablestring/137043 "2008-05-08T18:31:44Z")

</div>

I keep forgetting to wrap up CLR strings in MutableStrings when returning strings retrieved from calls to .NET Framework library methods. I had this RSpec that had something like: some\_array\[3\].should == “some mutabl…

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

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