# Ruby

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

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

---

## [Why does IO.readlines() keep newlines?](https://www.ruby-forum.com/t/why-does-io-readlines-keep-newlines/120685)

<div class="topic-metadata">

**Author:** [@maz](https://www.ruby-forum.com/u/maz)\
**Replies:** 6\
**Last updated:** [November 20, 2007, 10:45pm UTC](https://www.ruby-forum.com/t/why-does-io-readlines-keep-newlines/120685 "2007-11-20T22:45:25Z")

</div>

At the very least, the win32 implementation of Ruby’s IO.readlines() method keeps the newline character on each string in the array. Considering that it is the newline that defines a “line,” it would not be wholly un…

---

## [Oracle Mix, powered by JRuby](https://www.ruby-forum.com/t/oracle-mix-powered-by-jruby/120104)

<div class="topic-metadata">

**Author:** [@alexeyv](https://www.ruby-forum.com/u/alexeyv)\
**Replies:** 4\
**Last updated:** [November 20, 2007, 10:41pm UTC](https://www.ruby-forum.com/t/oracle-mix-powered-by-jruby/120104 "2007-11-20T22:41:19Z")

</div>

Hi all, This Sunday Oracle launched a new customer interaction web app called Mix. Implementation-wise, it’s a rather regular Rails application, running on JRuby, Oracle Application Server (Oracle’s J2EE stack) and O…

---

## [Unsubscribe](https://www.ruby-forum.com/t/unsubscribe/120825)

<div class="topic-metadata">

**Author:** [@Nicholas\_E](https://www.ruby-forum.com/u/Nicholas_E)\
**Replies:** 0\
**Last updated:** [November 20, 2007, 10:03pm UTC](https://www.ruby-forum.com/t/unsubscribe/120825 "2007-11-20T22:03:50Z")

</div>

unsubscribe

---

## [Gsub question on special charaters](https://www.ruby-forum.com/t/gsub-question-on-special-charaters/120806)

<div class="topic-metadata">

**Author:** [@robkuz](https://www.ruby-forum.com/u/robkuz)\
**Replies:** 4\
**Last updated:** [November 20, 2007, 9:30pm UTC](https://www.ruby-forum.com/t/gsub-question-on-special-charaters/120806 "2007-11-20T21:30:58Z")

</div>

I have a string that looks like this : ts = “^LThe beginning of the sentence” I want to remove the “^L” I’ve tried ts.gsub!(/^\[^L\]/,’’) which removes the “^”, but I need to remove the “^L” when they are together an…

---

## [Doc for if, do, until etc](https://www.ruby-forum.com/t/doc-for-if-do-until-etc/120808)

<div class="topic-metadata">

**Author:** [@pie-social](https://www.ruby-forum.com/u/pie-social)\
**Replies:** 4\
**Last updated:** [November 20, 2007, 7:55pm UTC](https://www.ruby-forum.com/t/doc-for-if-do-until-etc/120808 "2007-11-20T19:55:12Z")

</div>

I do not see doc for above in rdoc. iam new to pgming. where can i see the ruby doc for above and other functions not covered in methods, modules. tx

---

## [Quick way to get attributes (without using collect)](https://www.ruby-forum.com/t/quick-way-to-get-attributes-without-using-collect/120795)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 5\
**Last updated:** [November 20, 2007, 6:26pm UTC](https://www.ruby-forum.com/t/quick-way-to-get-attributes-without-using-collect/120795 "2007-11-20T18:26:10Z")

</div>

This was inspired by Rails, but i think it’s common Ruby question. Say i have an array of Employee objects, which have an attribute “name”. I want to get all the names, as an array. Let’s say i already have the vari…

---

## [Unit Testing Framework](https://www.ruby-forum.com/t/unit-testing-framework/120789)

<div class="topic-metadata">

**Author:** [@sugarboy](https://www.ruby-forum.com/u/sugarboy)\
**Replies:** 3\
**Last updated:** [November 20, 2007, 6:06pm UTC](https://www.ruby-forum.com/t/unit-testing-framework/120789 "2007-11-20T18:06:42Z")

</div>

Hi All, Can anyone let me know whether there exists any tool in Ruby that resembles NUnit/JUnit of .Net/.Java. Thanks in advance, Sagar

---

## [POST data and mod\_ruby](https://www.ruby-forum.com/t/post-data-and-mod-ruby/120792)

<div class="topic-metadata">

**Author:** [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Replies:** 2\
**Last updated:** [November 20, 2007, 5:57pm UTC](https://www.ruby-forum.com/t/post-data-and-mod-ruby/120792 "2007-11-20T17:57:55Z")

</div>

Can someone point me to how I can retrieve http POST data that is passed from Apache/mod\_ruby to my script? Everything I’ve found thusfar has been on the client side of things like submitting data TO a form instead of…

---

## [Ruby1.9 and fcgi](https://www.ruby-forum.com/t/ruby1-9-and-fcgi/120796)

<div class="topic-metadata">

**Author:** [@Rolando\_A](https://www.ruby-forum.com/u/Rolando_A)\
**Replies:** 1\
**Last updated:** [November 20, 2007, 5:54pm UTC](https://www.ruby-forum.com/t/ruby1-9-and-fcgi/120796 "2007-11-20T17:54:24Z")

</div>

I’m testing some web applications (not rails) that use ruby-fcgi with current trunk version of ruby1.9 (btw, I’m glad to see now, that gem is included as a part of ruby :-D). Well, the thing is, that when trying to in…

---

## [Arrays not working as I expected - help](https://www.ruby-forum.com/t/arrays-not-working-as-i-expected-help/120785)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [November 20, 2007, 5:48pm UTC](https://www.ruby-forum.com/t/arrays-not-working-as-i-expected-help/120785 "2007-11-20T17:48:32Z")

</div>

Hi I am new programmer to Ruby. Just 1 days old. I do have some background in java. I am having a problem that is troubling me since yesterday and having spend several hours on it, I still dont have any idea. CODE W…

---

## [Using lambda, binding happens immediately?](https://www.ruby-forum.com/t/using-lambda-binding-happens-immediately/120699)

<div class="topic-metadata">

**Author:** [@sam](https://www.ruby-forum.com/u/sam)\
**Replies:** 5\
**Last updated:** [November 20, 2007, 5:23pm UTC](https://www.ruby-forum.com/t/using-lambda-binding-happens-immediately/120699 "2007-11-20T17:23:21Z")

</div>

I have this code: require ‘test/unit’ require ‘leapyear’ class LeapYearTest \< Test::Unit::TestCase def setup @ly = LeapYear.new end def LeapYearTest.generate\_tests filename = “testdata.dat” file = File.new(filen…

---

## [Xml-mapping lib question?](https://www.ruby-forum.com/t/xml-mapping-lib-question/120661)

<div class="topic-metadata">

**Author:** [@zxem](https://www.ruby-forum.com/u/zxem)\
**Replies:** 1\
**Last updated:** [November 20, 2007, 5:21pm UTC](https://www.ruby-forum.com/t/xml-mapping-lib-question/120661 "2007-11-20T17:21:00Z")

</div>

Hi all, I got a xml looking like this. -0.015523356673284 I tried to create a ruby class for it which is used by xml-mapping library. class VolPoint include XML::Mapping text\_node :Interp, “@Interp”, :default\_valu…

---

## [GUI and ruby](https://www.ruby-forum.com/t/gui-and-ruby/120547)

<div class="topic-metadata">

**Author:** [@ulazar](https://www.ruby-forum.com/u/ulazar)\
**Replies:** 16\
**Last updated:** [November 20, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/gui-and-ruby/120547 "2007-11-20T16:30:17Z")

</div>

I would like to create an interface GUI with ruby. What I have to use? I would like that the GUI could be used in win, osx and linux. Is there a good interface builder?

---

## [Require functionality](https://www.ruby-forum.com/t/require-functionality/120759)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 3\
**Last updated:** [November 20, 2007, 4:00pm UTC](https://www.ruby-forum.com/t/require-functionality/120759 "2007-11-20T16:00:55Z")

</div>

hello can i verify if a library is loaded before doing a require ‘library’. if so how. thanks in advance

---

## [Goedel (#147)](https://www.ruby-forum.com/t/goedel-147/120424)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 20\
**Last updated:** [November 20, 2007, 3:41pm UTC](https://www.ruby-forum.com/t/goedel-147/120424 "2007-11-20T15:41:28Z")

</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: …

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/120774)

<div class="topic-metadata">

**Author:** [@szallol](https://www.ruby-forum.com/u/szallol)\
**Replies:** 0\
**Last updated:** [November 20, 2007, 3:17pm UTC](https://www.ruby-forum.com/t/no-subject/120774 "2007-11-20T15:17:27Z")

</div>

unsubscribe \*

---

## [Marshaled data ordering inconsistent](https://www.ruby-forum.com/t/marshaled-data-ordering-inconsistent/120755)

<div class="topic-metadata">

**Author:** [@mla](https://www.ruby-forum.com/u/mla)\
**Replies:** 1\
**Last updated:** [November 20, 2007, 1:40pm UTC](https://www.ruby-forum.com/t/marshaled-data-ordering-inconsistent/120755 "2007-11-20T13:40:34Z")

</div>

It seems that when you marshal hashes the binary representations aren’t stable. This is an issue with PStore because it uses the md5 of the marshaled data to decide whether it’s changed and whether a disk write is nee…

---

## [Hash -\> Struct](https://www.ruby-forum.com/t/hash-struct/120505)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 13\
**Last updated:** [November 20, 2007, 12:35pm UTC](https://www.ruby-forum.com/t/hash-struct/120505 "2007-11-20T12:35:58Z")

</div>

Given that a hash is not ordered, is this reliable? h = { :a=\>1, :b=\>2 } Struct.new(\*h.keys).new(\*h.values) =\> #\<struct #Class:0xb7aead00 a=1, b=2\> T.

---

## [Rcov-0.8.1: compatibility with Ruby 1.8.6-p11\[01\], intentional testing with RSpec, etc](https://www.ruby-forum.com/t/rcov-0-8-1-compatibility-with-ruby-1-8-6-p11-01-intentional-testing-with-rspec-etc/120691)

<div class="topic-metadata">

**Author:** [@tulkas](https://www.ruby-forum.com/u/tulkas)\
**Replies:** 6\
**Last updated:** [November 20, 2007, 12:03pm UTC](https://www.ruby-forum.com/t/rcov-0-8-1-compatibility-with-ruby-1-8-6-p11-01-intentional-testing-with-rspec-etc/120691 "2007-11-20T12:03:04Z")

</div>

Source code, additional information, screenshots… available at eigenclass.org Release info: eigenclass.org Sample fully cross-referenced report at eigenclass.org This release includes two RubyGems packages: a binar…

---

## [Random string](https://www.ruby-forum.com/t/random-string/120753)

<div class="topic-metadata">

**Author:** [@joakim](https://www.ruby-forum.com/u/joakim)\
**Replies:** 1\
**Last updated:** [November 20, 2007, 12:01pm UTC](https://www.ruby-forum.com/t/random-string/120753 "2007-11-20T12:01:25Z")

</div>

lala = ‘Koko’ tjucka = ‘tero’ asdf = ‘jfsd’ puts \<?????????????????\> What should I have instead of \<?????????????????\> for the program to puts one random string either “Koko”, “tero” or “jfsd”?

---

## [Ruby on Rails Developer â€“ London â€“ Upto Â£55k â€“ Ruby on Rails](https://www.ruby-forum.com/t/ruby-on-rails-developer-a-london-a-upto-a-55k-a-ruby-on-rails/120756)

<div class="topic-metadata">

**Author:** [@jasonwold](https://www.ruby-forum.com/u/jasonwold)\
**Replies:** 0\
**Last updated:** [November 20, 2007, 12:01pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-developer-a-london-a-upto-a-55k-a-ruby-on-rails/120756 "2007-11-20T12:01:11Z")

</div>

An exciting opportunity for Ruby on Rails fans!! A successful media client is looking for an enthusiastic Ruby on Rails developer- someone who can hit the ground running! This is a great opportunity for someone who wa…

---

## [Exit call in script causes unit test to not run (newby)](https://www.ruby-forum.com/t/exit-call-in-script-causes-unit-test-to-not-run-newby/120720)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 5\
**Last updated:** [November 20, 2007, 10:49am UTC](https://www.ruby-forum.com/t/exit-call-in-script-causes-unit-test-to-not-run-newby/120720 "2007-11-20T10:49:52Z")

</div>

Hello. I’ve been grappling with unit testing for a couple weeks now. I’m a bourne shell scripter by day who is trying to expand my skill set. I currently have a ruby script which I’m trying to create some unit t…

---

## [Standard location to put extension info?](https://www.ruby-forum.com/t/standard-location-to-put-extension-info/120745)

<div class="topic-metadata">

**Author:** [@Chintana\_W](https://www.ruby-forum.com/u/Chintana_W)\
**Replies:** 0\
**Last updated:** [November 20, 2007, 10:40am UTC](https://www.ruby-forum.com/t/standard-location-to-put-extension-info/120745 "2007-11-20T10:40:31Z")

</div>

Hi, I need to store some information such as the default log level, an absolute path that’ll contains the repository location in the file system for an extension written in C. This extension is a wrapper to a librar…

---

## [Webrick alternative](https://www.ruby-forum.com/t/webrick-alternative/120291)

<div class="topic-metadata">

**Author:** [@mcampbell](https://www.ruby-forum.com/u/mcampbell)\
**Replies:** 19\
**Last updated:** [November 20, 2007, 10:39am UTC](https://www.ruby-forum.com/t/webrick-alternative/120291 "2007-11-20T10:39:20Z")

</div>

Hi, I’am looking for a small webserver running some ruby classes/servlets. My first steps I was going with webrick, but the memory footprint is unacceptable for the target plattform. Anybody knows a small webserver, …

---

## [Table layout question](https://www.ruby-forum.com/t/table-layout-question/120742)

<div class="topic-metadata">

**Author:** [@remco](https://www.ruby-forum.com/u/remco)\
**Replies:** 0\
**Last updated:** [November 20, 2007, 10:09am UTC](https://www.ruby-forum.com/t/table-layout-question/120742 "2007-11-20T10:09:50Z")

</div>

Hi… I am getting grey hair…i don’t now the right setup for the solution. Maybe you can help?.. Concept. companyX has for each period (1 year, 2 years ect) different 5 values… So for example: 2 years…has the value …

---

## [Rails boredom antidote?](https://www.ruby-forum.com/t/rails-boredom-antidote/120695)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 6\
**Last updated:** [November 20, 2007, 10:04am UTC](https://www.ruby-forum.com/t/rails-boredom-antidote/120695 "2007-11-20T10:04:47Z")

</div>

Bit heretical but I’m kinda flagging on doing Rails day in and day out. Two questions if anybody’s interested - What are people working on in Ruby that doesn’t Rails? Or, what in Rails is interesting and exciting to m…

---

## [Is out of the office](https://www.ruby-forum.com/t/is-out-of-the-office/120738)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [November 20, 2007, 9:19am UTC](https://www.ruby-forum.com/t/is-out-of-the-office/120738 "2007-11-20T09:19:09Z")

</div>

I will be out of the office starting 11/20/2007 and will not return until 11/25/2007. NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged informat…

---

## [Igraph 0.9.0 Released](https://www.ruby-forum.com/t/igraph-0-9-0-released/120616)

<div class="topic-metadata">

**Author:** [@oscar-alexander](https://www.ruby-forum.com/u/oscar-alexander)\
**Replies:** 6\
**Last updated:** [November 20, 2007, 9:15am UTC](https://www.ruby-forum.com/t/igraph-0-9-0-released/120616 "2007-11-20T09:15:38Z")

</div>

igraph version 0.9.0 has been released! http://igraph.rubyforge.org/ IGraph is a Ruby extension for interfacing with igraph (http://cneurocvs.rmki.kfki.hu/igraph/ ), a C library for creating and manipulating graphs …

---

## [IO#close\_on\_exec? and IO#close\_on\_exec=](https://www.ruby-forum.com/t/io-close-on-exec-and-io-close-on-exec/120728)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 1\
**Last updated:** [November 20, 2007, 9:09am UTC](https://www.ruby-forum.com/t/io-close-on-exec-and-io-close-on-exec/120728 "2007-11-20T09:09:10Z")

</div>

IO#close\_on\_exec? e$B$He(B IO#close\_on\_exec= e$B$rF3F~$7$F!"$3$l$i$Ge(B e$B$Oe(B 2e$B$D$Ne(B fd e$B$r07$&$N$O$I$&$G$7$g$&$+!#e(B fd e$B$,e(B 2e$B$D$"$k$H!“C1=c$Je(B fcntl e$B$G$ON\>J}$re(B close on exec e$B$K$Ge(B e$B…

---

## [Use two pipes for duplex IO.popen](https://www.ruby-forum.com/t/use-two-pipes-for-duplex-io-popen/119818)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 6\
**Last updated:** [November 20, 2007, 9:08am UTC](https://www.ruby-forum.com/t/use-two-pipes-for-duplex-io-popen/119818 "2007-11-20T09:08:35Z")

</div>

e$B2~?4$7$Fe(B duplex e$B$Je(B IO.popen e$B$Ge(B socketpair e$B$r;H$&$N$O$d$a$h$&e(B e$B$H;W$&$N$G$9$,!"$I$&$G$7$g$&$+!#e(B e$B$H$$$&$N$O!"5/F0$7$?%W%m%0%i%$,I8==PNO$r%/%m!\<%:$7$?$3$H$re(B e$B?F$,8!CN$G$-$J$$$+$i$G$9…

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

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