# Ruby

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

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

---

## [Hexdump (#171)](https://www.ruby-forum.com/t/hexdump-171/144654)

<div class="topic-metadata">

**Author:** [@mansfiem](https://www.ruby-forum.com/u/mansfiem)\
**Replies:** 0\
**Last updated:** [July 31, 2008, 8:38pm UTC](https://www.ruby-forum.com/t/hexdump-171/144654 "2008-07-31T20:38:13Z")

</div>

When learning a new programming language, the first thing many coders do is write the traditional “Hello, world!” program. This generally provides the bare minimum needed for coding: base program structure, compilatio…

---

## [Question on do block](https://www.ruby-forum.com/t/question-on-do-block/144651)

<div class="topic-metadata">

**Author:** [@CompGeek78](https://www.ruby-forum.com/u/CompGeek78)\
**Replies:** 2\
**Last updated:** [July 31, 2008, 8:20pm UTC](https://www.ruby-forum.com/t/question-on-do-block/144651 "2008-07-31T20:20:38Z")

</div>

While going through some practice code from a book, I ran into an odd issue with this do block. The book put the code this way and it worked fine. def mtdarry 10.times do |num| square = num \* num return num, square…

---

## [Cursor position within the console in ruby](https://www.ruby-forum.com/t/cursor-position-within-the-console-in-ruby/144647)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [July 31, 2008, 7:51pm UTC](https://www.ruby-forum.com/t/cursor-position-within-the-console-in-ruby/144647 "2008-07-31T19:51:22Z")

</div>

Hello… I’ve been working with ruby for some time, but this one has me stumped. Is there a nice way to position the cursor within the console? For instance, something simple: just move up one line relatively? In…

---

## [Code Review: MOX4](https://www.ruby-forum.com/t/code-review-mox4/144648)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [July 31, 2008, 7:37pm UTC](https://www.ruby-forum.com/t/code-review-mox4/144648 "2008-07-31T19:37:51Z")

</div>

tfpt review “/shelveset:MOX4;REDMOND\\tomat” Next step towards meta-objects in Ruby. Ruby: Removes dependency on RuleBuilder from all rule generators in Ruby. The generators use a MetaObjectBuilder that stores re…

---

## [Re: How to get special directories?](https://www.ruby-forum.com/t/re-how-to-get-special-directories/144640)

<div class="topic-metadata">

**Author:** [@wujciol](https://www.ruby-forum.com/u/wujciol)\
**Replies:** 0\
**Last updated:** [July 31, 2008, 6:31pm UTC](https://www.ruby-forum.com/t/re-how-to-get-special-directories/144640 "2008-07-31T18:31:05Z")

</div>

Hi, You can get it using ENV. Try this in irb: ENV #hash with many info Home folder: ENV\[“HOME”\] #only path to home folder

---

## [Problems Upgrading to Rails 2.1.0 with JRuby](https://www.ruby-forum.com/t/problems-upgrading-to-rails-2-1-0-with-jruby/144614)

<div class="topic-metadata">

**Author:** [@David\_Christiansen](https://www.ruby-forum.com/u/David_Christiansen)\
**Replies:** 2\
**Last updated:** [July 31, 2008, 6:19pm UTC](https://www.ruby-forum.com/t/problems-upgrading-to-rails-2-1-0-with-jruby/144614 "2008-07-31T18:19:24Z")

</div>

Hi everyone - I’m having difficulty upgrading to Rails 2.1.0 from the configuration listed below. I’m testing our app out to see if we can upgrade our stack. I use a Mac (OS 10.5), but everyone else on the dev team us…

---

## [Hpricot-0.6-java issues](https://www.ruby-forum.com/t/hpricot-0-6-java-issues/143299)

<div class="topic-metadata">

**Author:** [@iceburgh](https://www.ruby-forum.com/u/iceburgh)\
**Replies:** 6\
**Last updated:** [July 31, 2008, 5:57pm UTC](https://www.ruby-forum.com/t/hpricot-0-6-java-issues/143299 "2008-07-31T17:57:07Z")

</div>

Hi all. Has anyone had any issues with Hpricot lately? I’m running on JRuby 1.1.2… irb(main):001:0\> require ‘rubygems’ =\> true irb(main):002:0\> require ‘hpricot’ =\> true irb(main):003:0\> t = “this is a test googl…

---

## [Multithreading in JRuby on Rails App](https://www.ruby-forum.com/t/multithreading-in-jruby-on-rails-app/144579)

<div class="topic-metadata">

**Author:** [@Myron\_M](https://www.ruby-forum.com/u/Myron_M)\
**Replies:** 4\
**Last updated:** [July 31, 2008, 5:53pm UTC](https://www.ruby-forum.com/t/multithreading-in-jruby-on-rails-app/144579 "2008-07-31T17:53:02Z")

</div>

Hello, I’ve done a decent amount of multi-threading in .NET, but have never done any in Java or Ruby. I couldn’t find anything about the topic on the JRuby wiki, so I just wanted to get some feedback. Basically, I…

---

## [Re: Rcov for JRuby](https://www.ruby-forum.com/t/re-rcov-for-jruby/144637)

<div class="topic-metadata">

**Author:** [@Jay\_McGaffigan](https://www.ruby-forum.com/u/Jay_McGaffigan)\
**Replies:** 0\
**Last updated:** [July 31, 2008, 5:49pm UTC](https://www.ruby-forum.com/t/re-rcov-for-jruby/144637 "2008-07-31T17:49:31Z")

</div>

ah. When I read the rules I didn’t catch the same base name. I thought rcov.x.y.z-java would be different from rcov.x.y.z Thanks for that. As I said I’m working to get it into Rcov proper so that there is one place …

---

## [Lone Star Ruby Conference 2008](https://www.ruby-forum.com/t/lone-star-ruby-conference-2008/144625)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [July 31, 2008, 5:04pm UTC](https://www.ruby-forum.com/t/lone-star-ruby-conference-2008/144625 "2008-07-31T17:04:15Z")

</div>

Greetings This is a quick reminder that the second annual Lone Star Ruby Conference (Sep 4-6) is filling up quickly and early registration ends soon (Aug 10). We have an excellent program this year. Matz and Evan P.…

---

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

<div class="topic-metadata">

**Author:** [@Joseph\_Paish](https://www.ruby-forum.com/u/Joseph_Paish)\
**Replies:** 0\
**Last updated:** [July 31, 2008, 4:33pm UTC](https://www.ruby-forum.com/t/no-subject/144621 "2008-07-31T16:33:41Z")

</div>

“unsubscribe”

---

## [How to do methodsoverloading in](https://www.ruby-forum.com/t/how-to-do-methodsoverloading-in/144507)

<div class="topic-metadata">

**Author:** [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Replies:** 12\
**Last updated:** [July 31, 2008, 4:00pm UTC](https://www.ruby-forum.com/t/how-to-do-methodsoverloading-in/144507 "2008-07-31T16:00:17Z")

</div>

Hi, ruby is object oriented language then how overloading is not possible in ruby? I want same method name with different parameters but it not work in ruby?

---

## [Q: Documentation for PGconn](https://www.ruby-forum.com/t/q-documentation-for-pgconn/144506)

<div class="topic-metadata">

**Author:** [@GSRalph\_KuntzS\_MD](https://www.ruby-forum.com/u/GSRalph_KuntzS_MD)\
**Replies:** 5\
**Last updated:** [July 31, 2008, 3:42pm UTC](https://www.ruby-forum.com/t/q-documentation-for-pgconn/144506 "2008-07-31T15:42:16Z")

</div>

Is there any documentation for PGconn (or postgres/postgres)? When I do ‘ri postgres’ I get the message ‘Nothing known about postgres’, even though the module works fine in test cases with jruby and cygwin- ruby in Wi…

---

## [CORBA and Ruby](https://www.ruby-forum.com/t/corba-and-ruby/144613)

<div class="topic-metadata">

**Author:** [@johnny\_w](https://www.ruby-forum.com/u/johnny_w)\
**Replies:** 0\
**Last updated:** [July 31, 2008, 2:20pm UTC](https://www.ruby-forum.com/t/corba-and-ruby/144613 "2008-07-31T14:20:45Z")

</div>

Hi all, Remedy IT has released last year R2CORBA which makes it possible to implement CORBA clients and servers with Ruby. We have made a draft language mapping and are trying to get this formally standardized throug…

---

## [Re: My simple downloader doesn't work](https://www.ruby-forum.com/t/re-my-simple-downloader-doesnt-work/144612)

<div class="topic-metadata">

**Author:** [@wujciol](https://www.ruby-forum.com/u/wujciol)\
**Replies:** 0\
**Last updated:** [July 31, 2008, 2:16pm UTC](https://www.ruby-forum.com/t/re-my-simple-downloader-doesnt-work/144612 "2008-07-31T14:16:39Z")

</div>

Maybe because active ftp and your firewall, try: require ‘open-uri’ open(“ftp://whatever.ftp.site”, :ftp\_active\_mode =\> false).read I get TypeError: Cannot convert Hash into String.

---

## ["\\x80".force\_encoding("utf-8").encode("utf-32be",:invalid=\>:replace)](https://www.ruby-forum.com/t/x80-force-encoding-utf-8-encode-utf-32be-invalid-replace/144611)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [July 31, 2008, 2:13pm UTC](https://www.ruby-forum.com/t/x80-force-encoding-utf-8-encode-utf-32be-invalid-replace/144611 "2008-07-31T14:13:08Z")

</div>

“\\x80”.force\_encoding(“utf-8”).encode(“utf-32be”,:invalid=\>:replace) e$B$H$9$k$H!"e(B “\\x00” e$B$K$J$j$^$9!#e(B % ./ruby -ve ’ s = “\\x80”.force\_encoding(“utf-8”).encode(“utf-32be”,:invalid=\>:replace) p s.force\_encod…

---

## [Re: jruby-openssl -\> jruby-complete.jar](https://www.ruby-forum.com/t/re-jruby-openssl-jruby-complete-jar/144608)

<div class="topic-metadata">

**Author:** [@samoht](https://www.ruby-forum.com/u/samoht)\
**Replies:** 1\
**Last updated:** [July 31, 2008, 2:10pm UTC](https://www.ruby-forum.com/t/re-jruby-openssl-jruby-complete-jar/144608 "2008-07-31T14:10:48Z")

</div>

Ali S. wrote: concerning the same issue, the procedure of modifying the build.xml works for some gems but not all. For instance I tried adding “roxml” gem to the jruby-complete.jar but I my simple 2 line script (requir…

---

## [Is Ruby 1.9 released](https://www.ruby-forum.com/t/is-ruby-1-9-released/144605)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 1\
**Last updated:** [July 31, 2008, 2:08pm UTC](https://www.ruby-forum.com/t/is-ruby-1-9-released/144605 "2008-07-31T14:08:18Z")

</div>

Hi Is Ruby 1.9 released? I am currently using 1.8.6 If released what will be advantages of 1.9 in case of speed etc Thanks in dvance Sijo

---

## [Webgen 0.5.1 released](https://www.ruby-forum.com/t/webgen-0-5-1-released/144602)

<div class="topic-metadata">

**Author:** [@tlockney](https://www.ruby-forum.com/u/tlockney)\
**Replies:** 0\
**Last updated:** [July 31, 2008, 12:07pm UTC](https://www.ruby-forum.com/t/webgen-0-5-1-released/144602 "2008-07-31T12:07:46Z")

</div>

Hey everybody! I have just released webgen 0.5.1! If you don’t know what webgen is, read the “What’s webgen?” section down below. Since the 0.5.0 release did not have as many features as the older 0.4.x releases, thi…

---

## [Single Line replacement in file](https://www.ruby-forum.com/t/single-line-replacement-in-file/144287)

<div class="topic-metadata">

**Author:** [@jazzezravi](https://www.ruby-forum.com/u/jazzezravi)\
**Replies:** 3\
**Last updated:** [July 31, 2008, 10:58am UTC](https://www.ruby-forum.com/t/single-line-replacement-in-file/144287 "2008-07-31T10:58:04Z")

</div>

Hi All, My code: code.rb lines=File.open(“hi.txt”,“r”) output=\[\] lines.each do |single| out1=single.split(’ ‘) out2=out1\[0\].gsub(’‘, ‘’) out3= out2.gsub(’‘, ‘’) out4=out3.gsub(’‘,’') output \<\< out4 # I need to…

---

## [Jruby-openssl -\> jruby-complete.jar](https://www.ruby-forum.com/t/jruby-openssl-jruby-complete-jar/144587)

<div class="topic-metadata">

**Author:** [@samoht](https://www.ruby-forum.com/u/samoht)\
**Replies:** 1\
**Last updated:** [July 31, 2008, 10:55am UTC](https://www.ruby-forum.com/t/jruby-openssl-jruby-complete-jar/144587 "2008-07-31T10:55:09Z")

</div>

Hi, I guess my problem is related to the threads of Ali S. (“Issue with the gems using jruby-complete” \[1\] and “Calling Jruby -S from a java code.” \[2\]), but I didn’t want to mess up those threads. So, I try to inclu…

---

## [How to run Ruby on 64-bit Windows?](https://www.ruby-forum.com/t/how-to-run-ruby-on-64-bit-windows/144555)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 4\
**Last updated:** [July 31, 2008, 10:10am UTC](https://www.ruby-forum.com/t/how-to-run-ruby-on-64-bit-windows/144555 "2008-07-31T10:10:41Z")

</div>

Is there a way to get a precompiled binary or compile Ruby for 64-bit Windows?

---

## [Compile on windows](https://www.ruby-forum.com/t/compile-on-windows/144524)

<div class="topic-metadata">

**Author:** [@Ronn\_Ross](https://www.ruby-forum.com/u/Ronn_Ross)\
**Replies:** 2\
**Last updated:** [July 31, 2008, 9:56am UTC](https://www.ruby-forum.com/t/compile-on-windows/144524 "2008-07-31T09:56:37Z")

</div>

Hello all, I’m running Ruby on windows xp. I made changes to the keywords file and would like to recompile the Ruby source to see my changes. How do I recompile Ruby source on windows? Thanks in advance

---

## [IO.pos bug?](https://www.ruby-forum.com/t/io-pos-bug/144341)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 5\
**Last updated:** [July 31, 2008, 9:27am UTC](https://www.ruby-forum.com/t/io-pos-bug/144341 "2008-07-31T09:27:56Z")

</div>

irb(main):001:0\> f = File.new("/etc/host.conf") =\> #\<File:/etc/host.conf\> irb(main):002:0\> f.gets =\> “multi off\\n” irb(main):003:0\> f.pos =\> 10 irb(main):004:0\> f.gets =\> “order hosts,bind\\n” irb(main):005:0\> f.p…

---

## [Str.encode("utf-32le", :invalid=\>:replace)](https://www.ruby-forum.com/t/str-encode-utf-32le-invalid-replace/144584)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [July 31, 2008, 8:31am UTC](https://www.ruby-forum.com/t/str-encode-utf-32le-invalid-replace/144584 "2008-07-31T08:31:46Z")

</div>

UTF-8 e$B$H$7$F@5$7$/$J$$$b$N$re(B String#encode e$B$Ge(B UTF-32LE e$B$KJQe(B e$B49$9$k$H$-$Ke(B :invalid=\>:replace e$B$r;XDj$7$?$H$-!"e(BUTF-32LE e$B$He(B e$B$7$F@5$7$/$J$$$b$N$,JV$C$F$-$^$9!#e(B % ./ruby -ve ’ s …

---

## [PENDINGS.rb (Was: Re: \[Ruby 1.9 - Bug #354\] (Assigned) Test failure test/ruby/test\_transcode.rb)](https://www.ruby-forum.com/t/pendings-rb-was-re-ruby-1-9-bug-354-assigned-test-failure-test-ruby-test-transcode-rb/144015)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 13\
**Last updated:** [July 31, 2008, 7:15am UTC](https://www.ruby-forum.com/t/pendings-rb-was-re-ruby-1-9-bug-354-assigned-test-failure-test-ruby-test-transcode-rb/144015 "2008-07-31T07:15:08Z")

</div>

e$B1sF#$G$9!#e(B 2008/07/24 0:44 Yui NARUSE removed\_email\_address@domain.invalid: e$B0J\>e$N$h$&$JM}M3$N$?$a!"=$@5$Oe(B transcode e$B$N;EMM$N3NDjBT$A$H$J$k$?$a!"e(B e$B!VEvLL$N4V=$@5$5$l$J$$4{CN$N%P%0!W$H$$$&$N$,8=:\_$…

---

## [\[ruby & win xp\] Captha problem](https://www.ruby-forum.com/t/ruby-win-xp-captha-problem/144575)

<div class="topic-metadata">

**Author:** [@riv](https://www.ruby-forum.com/u/riv)\
**Replies:** 0\
**Last updated:** [July 31, 2008, 4:00am UTC](https://www.ruby-forum.com/t/ruby-win-xp-captha-problem/144575 "2008-07-31T04:00:34Z")

</div>

Hello, I have created small application which has to log me in onto forum. Login form has also php generated token. Im using hpricot & mechanize & captha to hadle this form. My problem is: when captha download token t…

---

## [Encoding of Dir#path](https://www.ruby-forum.com/t/encoding-of-dir-path/144416)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 3\
**Last updated:** [July 31, 2008, 3:29am UTC](https://www.ruby-forum.com/t/encoding-of-dir-path/144416 "2008-07-31T03:29:25Z")

</div>

e$B0J2\<$N$h$&$K!"e(BDir#path e$B$GJV$C$F$/$k$b$N$N%(%s%3!\<%G%#%s%0$,!"e(B Dir.open e$B$KEO$7$?$b$N$H0\[$J$k$N$OJQ$G$O$J$$$G$7$g$&$+!#e(B % ./ruby -Ku -ve ’ dirname = “/tmp/\\x91\\x92\\x93” Dir.mkdir(dirname) p \[dirname…

---

## [The old sorting ip addresses problem](https://www.ruby-forum.com/t/the-old-sorting-ip-addresses-problem/144473)

<div class="topic-metadata">

**Author:** [@matu](https://www.ruby-forum.com/u/matu)\
**Replies:** 3\
**Last updated:** [July 31, 2008, 2:07am UTC](https://www.ruby-forum.com/t/the-old-sorting-ip-addresses-problem/144473 "2008-07-31T02:07:33Z")

</div>

i am sure there has to be some ruby way of doing this in a really simple way… i came up with this, but i am sure there is some other way that is much cleaner. a = \[“5.100.200.50”, “10.150.50.1”, “10.150.50.2”, “10.…

---

## [Another Deaf Grandma Topic, different issue](https://www.ruby-forum.com/t/another-deaf-grandma-topic-different-issue/144381)

<div class="topic-metadata">

**Author:** [@phee](https://www.ruby-forum.com/u/phee)\
**Replies:** 6\
**Last updated:** [July 31, 2008, 1:59am UTC](https://www.ruby-forum.com/t/another-deaf-grandma-topic-different-issue/144381 "2008-07-31T01:59:18Z")

</div>

I’m trying to learn using a tut, and I’m getting stuck on one of the exercises. Google is giving me squat. It’s about Flow Control, specifically while and if-then. I understand it totally, but I need, well, it’s hard …

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

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