# Ruby

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

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

---

## [How to create Badge Reports in PDF Format](https://www.ruby-forum.com/t/how-to-create-badge-reports-in-pdf-format/120063)

<div class="topic-metadata">

**Author:** [@anilbhat21](https://www.ruby-forum.com/u/anilbhat21)\
**Replies:** 1\
**Last updated:** [November 13, 2007, 2:24pm UTC](https://www.ruby-forum.com/t/how-to-create-badge-reports-in-pdf-format/120063 "2007-11-13T14:24:10Z")

</div>

Hi All, I have been trying to create badge reports in pdf format but I couldn’t find any way to do it. Please help me.

---

## [Case when when](https://www.ruby-forum.com/t/case-when-when/119935)

<div class="topic-metadata">

**Author:** [@shuaib85](https://www.ruby-forum.com/u/shuaib85)\
**Replies:** 3\
**Last updated:** [November 13, 2007, 1:21pm UTC](https://www.ruby-forum.com/t/case-when-when/119935 "2007-11-13T13:21:56Z")

</div>

Hi all I am just wondering how can we make two cases belong to the same bunch of code. I tried to do it like c but it did not work. it is like this in c switch(x) { case 5: #do bla bla break; case 7 : case 9: #…

---

## [File Uploading codes](https://www.ruby-forum.com/t/file-uploading-codes/120054)

<div class="topic-metadata">

**Author:** [@nad](https://www.ruby-forum.com/u/nad)\
**Replies:** 2\
**Last updated:** [November 13, 2007, 12:37pm UTC](https://www.ruby-forum.com/t/file-uploading-codes/120054 "2007-11-13T12:37:35Z")

</div>

I used the following codes found in the net to use to write a file to upload the files. down are the codes i have used. but still i did not able to get the correct coding. so if somebody know where i have gone wrong p…

---

## [Setting attributes with composition](https://www.ruby-forum.com/t/setting-attributes-with-composition/120037)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 3\
**Last updated:** [November 13, 2007, 11:12am UTC](https://www.ruby-forum.com/t/setting-attributes-with-composition/120037 "2007-11-13T11:12:22Z")

</div>

The Dragon class is composed of the Room class and the Traits class. The Room class inherits from the Location class which has attribute accessors. From the “creatures.rb” file, how can the attributes for a particula…

---

## [To\_yaml and international characters](https://www.ruby-forum.com/t/to-yaml-and-international-characters/118036)

<div class="topic-metadata">

**Author:** [@h3rald](https://www.ruby-forum.com/u/h3rald)\
**Replies:** 14\
**Last updated:** [November 13, 2007, 10:37am UTC](https://www.ruby-forum.com/t/to-yaml-and-international-characters/118036 "2007-11-13T10:37:56Z")

</div>

Hello, I noticed some weird behavior when converting a string containing international characters to YAML: irb(main):002:0\> ‘test òùè’.to\_yaml =\> “— “test \\x95\\x97\\x8A”\\n” irb(main):003:0\> …but: irb(main):001:0\> ‘…

---

## [How to use URI and regex URL http://www.blog.com/57648392](https://www.ruby-forum.com/t/how-to-use-uri-and-regex-url-http-www-blog-com-57648392/120040)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [November 13, 2007, 8:50am UTC](https://www.ruby-forum.com/t/how-to-use-uri-and-regex-url-http-www-blog-com-57648392/120040 "2007-11-13T08:50:46Z")

</div>

hello, im creating a pagehandler script can someone help me on how to create a method that pass URL ? like for example, i do have an ie page with URL http://mem.profile.blog.com/75329384 the url is not constant. wha…

---

## [Outputting file sizes of each item in a directory (error)](https://www.ruby-forum.com/t/outputting-file-sizes-of-each-item-in-a-directory-error/120032)

<div class="topic-metadata">

**Author:** [@pood](https://www.ruby-forum.com/u/pood)\
**Replies:** 3\
**Last updated:** [November 13, 2007, 8:36am UTC](https://www.ruby-forum.com/t/outputting-file-sizes-of-each-item-in-a-directory-error/120032 "2007-11-13T08:36:07Z")

</div>

code: Dir.foreach(“bad”) do |f| puts “#{f}: #{File.size f}” end Each filename in the directory “bad” is displayed along with the file size. I know the file.size works because I tried it with an static name and disp…

---

## [Compare Patch](https://www.ruby-forum.com/t/compare-patch/119939)

<div class="topic-metadata">

**Author:** [@editkid](https://www.ruby-forum.com/u/editkid)\
**Replies:** 6\
**Last updated:** [November 13, 2007, 8:26am UTC](https://www.ruby-forum.com/t/compare-patch/119939 "2007-11-13T08:26:46Z")

</div>

Following on from the discussions about the \<=\> operator and the Range operator. The situation in the MRI is not consistent. There are some cases where an exception is thrown and some where nil is returned and in th…

---

## [Recursion occur when compile ruby source code](https://www.ruby-forum.com/t/recursion-occur-when-compile-ruby-source-code/120039)

<div class="topic-metadata">

**Author:** [@jarvis](https://www.ruby-forum.com/u/jarvis)\
**Replies:** 0\
**Last updated:** [November 13, 2007, 8:11am UTC](https://www.ruby-forum.com/t/recursion-occur-when-compile-ruby-source-code/120039 "2007-11-13T08:11:55Z")

</div>

I got problem in compiling the ruby source code,./configure works appropriately,when I run make,it seems falling into dead loop or infinite recursion,checking system header files over and over again.What could I do to…

---

## [TestIONonblock on 1.9](https://www.ruby-forum.com/t/testiononblock-on-1-9/120027)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 2\
**Last updated:** [November 13, 2007, 8:01am UTC](https://www.ruby-forum.com/t/testiononblock-on-1-9/120027 "2007-11-13T08:01:00Z")

</div>

e$B!!$5$5$@$G$9!%e(B e$B!!\<!$N$h$&$K%F%9%H$K\<:GT$7$^$9!%$H$$$&$+!$\<:GT$5$;$F$^$9!%e(B $ make test-all TESTS=’-v io’ ./miniruby …/trunk/runruby.rb --extout=.ext – “…/trunk/test/runner.rb” --basedir="…/trunk/test" --r…

---

## [Composition (Dragon "has a" Trait)](https://www.ruby-forum.com/t/composition-dragon-has-a-trait/119836)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 2\
**Last updated:** [November 13, 2007, 7:05am UTC](https://www.ruby-forum.com/t/composition-dragon-has-a-trait/119836 "2007-11-13T07:05:28Z")

</div>

I want to put all of the current attr\_accessor’s (:life, :strength, :charisma, :weapon) into class Traits so that each Creature instance will have one Traits object to go along with that class. by themselves, Traits,…

---

## [2008comp.lang.ruby](https://www.ruby-forum.com/t/2008comp-lang-ruby/120033)

<div class="topic-metadata">

**Author:** [@ashik](https://www.ruby-forum.com/u/ashik)\
**Replies:** 0\
**Last updated:** [November 13, 2007, 6:50am UTC](https://www.ruby-forum.com/t/2008comp-lang-ruby/120033 "2007-11-13T06:50:52Z")

</div>

the comp.lang.ruby… http://www.freewebs.com/thuiss/ http://indianfriendfinder.com/go/g906725-pmem

---

## [Name of a variable, at runtime](https://www.ruby-forum.com/t/name-of-a-variable-at-runtime/119912)

<div class="topic-metadata">

**Author:** [@banry](https://www.ruby-forum.com/u/banry)\
**Replies:** 4\
**Last updated:** [November 13, 2007, 6:22am UTC](https://www.ruby-forum.com/t/name-of-a-variable-at-runtime/119912 "2007-11-13T06:22:48Z")

</div>

This seems harder than the usual thing I’ve been tripping on (and finding answers in the pickaxe or online). I have an object: human. It has parts: human.hand human.foot. How can I say this: fred = human.new fred.ha…

---

## [Porting Ruby: 1.8 or 1.9?](https://www.ruby-forum.com/t/porting-ruby-1-8-or-1-9/119897)

<div class="topic-metadata">

**Author:** [@jay-levitt](https://www.ruby-forum.com/u/jay-levitt)\
**Replies:** 3\
**Last updated:** [November 13, 2007, 4:25am UTC](https://www.ruby-forum.com/t/porting-ruby-1-8-or-1-9/119897 "2007-11-13T04:25:56Z")

</div>

I’ve got a consulting gig at the moment, working on Stratus fault-tolerant servers, and I don’t have much excuse to play with Ruby. So I thought “Wouldn’t it be fun to try porting Ruby to Stratus?” (Stratus servers …

---

## [Test/net/http/test\_https\_proxy.rb](https://www.ruby-forum.com/t/test-net-http-test-https-proxy-rb/120026)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 0\
**Last updated:** [November 13, 2007, 3:45am UTC](https://www.ruby-forum.com/t/test-net-http-test-https-proxy-rb/120026 "2007-11-13T03:45:02Z")

</div>

e$B!!$5$5$@$G$9!%e(B e$B!!?\\F#$5$s$K!$$3$&$9$k$Y$-!$$H65$($FLc$$$^$7$?!%C/$K8@$($P$$$$$+$o$+e(B e$B$i$J$+$C$?$N$G!$e(B-dev e$B$K?6$j$^$9!%e(B Index: test/net/http/test\_https\_proxy.rb — test/net/http/test\_https\_proxy.r…

---

## [Class \<\<Time?](https://www.ruby-forum.com/t/class-time/119950)

<div class="topic-metadata">

**Author:** [@gamont](https://www.ruby-forum.com/u/gamont)\
**Replies:** 9\
**Last updated:** [November 13, 2007, 3:38am UTC](https://www.ruby-forum.com/t/class-time/119950 "2007-11-13T03:38:34Z")

</div>

Im see this example and i didnt understand how it works. I dont find doc abou this construct. I find about object-specific class (class \<\<a), but here its a class. class \<\<Time alias old\_now now def now old\_now.to…

---

## [Test-all on 1.9](https://www.ruby-forum.com/t/test-all-on-1-9/120024)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 0\
**Last updated:** [November 13, 2007, 3:30am UTC](https://www.ruby-forum.com/t/test-all-on-1-9/120024 "2007-11-13T03:30:22Z")

</div>

e$B!!$5$5$@$G$9!%e(B e$B!!0J2\<$N$h$&$Ke(B test-all e$B$N%F%9%H$,\<:GT$7$^$9!%$I$&$7$?$b$s$G$7$g$&$+!%e(B ruby 1.9.0 (2007-11-13 patchlevel 0) \[i686-linux\] socket: Failure: test\_listen(TestBasicSocket) \[/home/ko1…

---

## [JRuby Talk by David Koontz at Phoenix Java User Group](https://www.ruby-forum.com/t/jruby-talk-by-david-koontz-at-phoenix-java-user-group/120023)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [November 13, 2007, 3:25am UTC](https://www.ruby-forum.com/t/jruby-talk-by-david-koontz-at-phoenix-java-user-group/120023 "2007-11-13T03:25:42Z")

</div>

David K., of Rising Tide Software, will be giving a keynote talk about JRuby at the Phoenix Java User Group this Wednesday, Nov. 14, 6:3pm, at UAT. See http://www.phxjug.org/ for more details – James B. removed\_e…

---

## [Test-all TESTS=ripper $B$N7k2L(B](https://www.ruby-forum.com/t/test-all-tests-ripper-b-n7k2l-b/120021)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 0\
**Last updated:** [November 13, 2007, 3:12am UTC](https://www.ruby-forum.com/t/test-all-tests-ripper-b-n7k2l-b/120021 "2007-11-13T03:12:14Z")

</div>

e$B!!$5$5$@$G$9!%e(B e$B!!e(Bripper e$B$N%F%9%H$N7k2L$G$9!%$J$s$G$7$g$&!$$3$l!%:G6a$N%Q!\<%5$N1F6Ae(B e$B$@$H;W$&$s$G$9$,!%e(B Failure: test\_aref(TestRipper\_ParserEvents) \[/home/ko1/ruby/trunk/test/ripper/test\_par…

---

## [Test-all results - ruby 1.9.0 (2007-11-09 patchlevel 0) \[i686-linux\]](https://www.ruby-forum.com/t/test-all-results-ruby-1-9-0-2007-11-09-patchlevel-0-i686-linux/119676)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 3\
**Last updated:** [November 13, 2007, 3:06am UTC](https://www.ruby-forum.com/t/test-all-results-ruby-1-9-0-2007-11-09-patchlevel-0-i686-linux/119676 "2007-11-13T03:06:58Z")

</div>

e$B!!$5$5$@$G$9!%e(B e$B!!5W!9$Ke(B test-all TESTS=ruby e$B$rF0$+$7$F!JF0$+$;$k$h$&$K$7$F!K!$%P%0e(B e$B$r:F3NG’$7$^$7$?!%e(B (a) e$B%/%i%9JQ?t$N;EMMJQ99e(B e$B!!e(B1, 16) e$B$O%/%i%9JQ?t$N;EMM$K$h$k$b$N$H;W$$$^$9$…

---

## [How to wrap code examples in comments](https://www.ruby-forum.com/t/how-to-wrap-code-examples-in-comments/120016)

<div class="topic-metadata">

**Author:** [@bado](https://www.ruby-forum.com/u/bado)\
**Replies:** 2\
**Last updated:** [November 13, 2007, 2:36am UTC](https://www.ruby-forum.com/t/how-to-wrap-code-examples-in-comments/120016 "2007-11-13T02:36:35Z")

</div>

Hi guys, I tried to post this in removed\_email\_address@domain.invalid but nobody seems to be there. I’m new on documenting Ruby sources, I have some early opinions about RDoc but this time and want to ask you somethi…

---

## [What folder are user created Classes traditionally stored in?](https://www.ruby-forum.com/t/what-folder-are-user-created-classes-traditionally-stored-in/119996)

<div class="topic-metadata">

**Author:** [@jayson](https://www.ruby-forum.com/u/jayson)\
**Replies:** 2\
**Last updated:** [November 13, 2007, 2:00am UTC](https://www.ruby-forum.com/t/what-folder-are-user-created-classes-traditionally-stored-in/119996 "2007-11-13T02:00:57Z")

</div>

What is the traditional location for user made classes? Thanks Jay

---

## [Fractional part of a float](https://www.ruby-forum.com/t/fractional-part-of-a-float/120014)

<div class="topic-metadata">

**Author:** [@Jari\_W](https://www.ruby-forum.com/u/Jari_W)\
**Replies:** 4\
**Last updated:** [November 13, 2007, 12:23am UTC](https://www.ruby-forum.com/t/fractional-part-of-a-float/120014 "2007-11-13T00:23:55Z")

</div>

Is there any built-in method to get the fractional part from a float, or do I need to resolve to a… f - f.to\_i …kind of approach? Best regards, Jari W.

---

## [Net::NNTP accesses private methods?](https://www.ruby-forum.com/t/net-nntp-accesses-private-methods/120015)

<div class="topic-metadata">

**Author:** [@maz](https://www.ruby-forum.com/u/maz)\
**Replies:** 0\
**Last updated:** [November 13, 2007, 12:10am UTC](https://www.ruby-forum.com/t/net-nntp-accesses-private-methods/120015 "2007-11-13T00:10:28Z")

</div>

I’m trying out Net::NNTP and it’s accessing a private method on line 375: @socket = InternetMessageIO.open(@address, @port, @open\_timeout, @read\_timeout, @debug\_output) InternetMessageIO is not defined anywhere in t…

---

## [Identify open workbook in excel?](https://www.ruby-forum.com/t/identify-open-workbook-in-excel/119925)

<div class="topic-metadata">

**Author:** [@mihai](https://www.ruby-forum.com/u/mihai)\
**Replies:** 1\
**Last updated:** [November 12, 2007, 11:37pm UTC](https://www.ruby-forum.com/t/identify-open-workbook-in-excel/119925 "2007-11-12T23:37:32Z")

</div>

\-i have an excel file ex.xls open; -can i make a script that will search all opened excel files and if an excel file is ex.xls then ex.xls it will be memorized in an ruby variable? how can i do that? tbx

---

## [Threading from a loop](https://www.ruby-forum.com/t/threading-from-a-loop/119945)

<div class="topic-metadata">

**Author:** [@nickpoole](https://www.ruby-forum.com/u/nickpoole)\
**Replies:** 2\
**Last updated:** [November 12, 2007, 11:12pm UTC](https://www.ruby-forum.com/t/threading-from-a-loop/119945 "2007-11-12T23:12:30Z")

</div>

Hi, My problem is that I want a function to start as a new thread every time it’s called, hence allowing the loop to continue and spawn a thread for each iteration of the loop. Currently my loop waits for the function…

---

## [Newbie stuck with multiple conditions](https://www.ruby-forum.com/t/newbie-stuck-with-multiple-conditions/119901)

<div class="topic-metadata">

**Author:** [@martinr](https://www.ruby-forum.com/u/martinr)\
**Replies:** 3\
**Last updated:** [November 12, 2007, 10:28pm UTC](https://www.ruby-forum.com/t/newbie-stuck-with-multiple-conditions/119901 "2007-11-12T22:28:37Z")

</div>

Hi I am new to rails and programming. I am trying to get a conditional search from form results for a property search. I want to be able to contruct a search that will search (:all) if ID for all is returned or by i…

---

## [What's up with RAA](https://www.ruby-forum.com/t/whats-up-with-raa/120001)

<div class="topic-metadata">

**Author:** [@timhunter](https://www.ruby-forum.com/u/timhunter)\
**Replies:** 1\
**Last updated:** [November 12, 2007, 10:25pm UTC](https://www.ruby-forum.com/t/whats-up-with-raa/120001 "2007-11-12T22:25:41Z")

</div>

I’ve been getting “502 Bad Gateway” whenever I try to access raa.ruby-lang.org for several days now. Anybody know what’s up?

---

## [User awake?](https://www.ruby-forum.com/t/user-awake/119995)

<div class="topic-metadata">

**Author:** [@ernsttanaka](https://www.ruby-forum.com/u/ernsttanaka)\
**Replies:** 2\
**Last updated:** [November 12, 2007, 10:20pm UTC](https://www.ruby-forum.com/t/user-awake/119995 "2007-11-12T22:20:49Z")

</div>

I am a new RUBY programmer. so far I managed to write a ‘listener’ for my quote stream, maintain a quote database and fire off email messengers as alerts when certain condition occur. This all happened in the last 2 w…

---

## [Open URI and web scraping](https://www.ruby-forum.com/t/open-uri-and-web-scraping/120002)

<div class="topic-metadata">

**Author:** [@jeannibee](https://www.ruby-forum.com/u/jeannibee)\
**Replies:** 0\
**Last updated:** [November 12, 2007, 8:42pm UTC](https://www.ruby-forum.com/t/open-uri-and-web-scraping/120002 "2007-11-12T20:42:27Z")

</div>

Hi I apologize if this is off topic but I couldn’t figure out how to reach the right audience based on the lists on this forum. Here goes; I am writing a web scraper in an attempt to mimic a VERY light version of ‘wg…

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

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