# Ruby

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

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

---

## [Change/ignore XML encoding?](https://www.ruby-forum.com/t/change-ignore-xml-encoding/146572)

<div class="topic-metadata">

**Author:** [@travisbell](https://www.ruby-forum.com/u/travisbell)\
**Replies:** 7\
**Last updated:** [August 24, 2008, 10:26pm UTC](https://www.ruby-forum.com/t/change-ignore-xml-encoding/146572 "2008-08-24T22:26:00Z")

</div>

Hey guys, I think I am missing something very basic here. I have an XML request, using the following code as an example: require “rubygems” require “xml/libxml” movie = “sin+city” search\_url = ‘http://www.movie-xm…

---

## [Remove\_const, Kernel.load, and already instantiated objects](https://www.ruby-forum.com/t/remove-const-kernel-load-and-already-instantiated-objects/146621)

<div class="topic-metadata">

**Author:** [@Brent\_D](https://www.ruby-forum.com/u/Brent_D)\
**Replies:** 7\
**Last updated:** [August 24, 2008, 10:03pm UTC](https://www.ruby-forum.com/t/remove-const-kernel-load-and-already-instantiated-objects/146621 "2008-08-24T22:03:58Z")

</div>

Context: I’m programming a MUD in Ruby for fun and profit–if one considers that an increase in knowledge == profit. :slight\_smile: Up to this point, I’ve only ever done web work with Ruby using Rails, Merb, etc., so I…

---

## [Ruby Documentation](https://www.ruby-forum.com/t/ruby-documentation/146726)

<div class="topic-metadata">

**Author:** [@fantomknight10](https://www.ruby-forum.com/u/fantomknight10)\
**Replies:** 1\
**Last updated:** [August 24, 2008, 9:47pm UTC](https://www.ruby-forum.com/t/ruby-documentation/146726 "2008-08-24T21:47:49Z")

</div>

Does the ruby project provide any equivalent to the Python pydoc -g command, to provide browsable documentation via an embedded web server?

---

## [RCR: instance\_methods(ancestor)](https://www.ruby-forum.com/t/rcr-instance-methods-ancestor/146727)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 1\
**Last updated:** [August 24, 2008, 8:22pm UTC](https://www.ruby-forum.com/t/rcr-instance-methods-ancestor/146727 "2008-08-24T20:22:44Z")

</div>

= Problem Currently Module#instance\_methods (and company) take a single argument, true or false, as to whether to include all ancestor methods. I’ve written enough metacode to come across the need to limit the search…

---

## [Defining sort \<=\> for a class](https://www.ruby-forum.com/t/defining-sort-for-a-class/146709)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 6\
**Last updated:** [August 24, 2008, 5:43pm UTC](https://www.ruby-forum.com/t/defining-sort-for-a-class/146709 "2008-08-24T17:43:15Z")

</div>

If i have a class class Example attr\_accessor :value def initialize @value = 0 end end and I have an array of examples and want to sort them based on value how do i define a \<=\> for my class. I know its possible …

---

## [Interesting challenge - can it be done?](https://www.ruby-forum.com/t/interesting-challenge-can-it-be-done/146625)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 4\
**Last updated:** [August 24, 2008, 1:19pm UTC](https://www.ruby-forum.com/t/interesting-challenge-can-it-be-done/146625 "2008-08-24T13:19:17Z")

</div>

Hi im learning ruby and making a few scripts here and there. As part of an ongoing script regarding ebay i came up with a challenge though i dont know if its possible. Given say 200 items from ebay from the same categ…

---

## [Class\_eval vs. reopening class](https://www.ruby-forum.com/t/class-eval-vs-reopening-class/146680)

<div class="topic-metadata">

**Author:** [@toddlc](https://www.ruby-forum.com/u/toddlc)\
**Replies:** 3\
**Last updated:** [August 24, 2008, 11:28am UTC](https://www.ruby-forum.com/t/class-eval-vs-reopening-class/146680 "2008-08-24T11:28:45Z")

</div>

I asked a similar question to this in the Rails forum, but it’s pretty generic to Ruby: Is the only difference between these the scoping or is there something more? ActionController::Base.class\_eval do include Actio…

---

## [Begin ... while ...?](https://www.ruby-forum.com/t/begin-while/146450)

<div class="topic-metadata">

**Author:** [@Kyung\_won\_C](https://www.ruby-forum.com/u/Kyung_won_C)\
**Replies:** 3\
**Last updated:** [August 24, 2008, 11:20am UTC](https://www.ruby-forum.com/t/begin-while/146450 "2008-08-24T11:20:45Z")

</div>

— test1.rb — def test\_begin\_while(\*l) b = begin a = l.shift end while !l.empty? end puts test\_begin\_while(1,2,3) =\> nil — test2.rb — def test\_begin\_while(\*l) b = begin a = l.shift end while !l.empty? b end puts…

---

## [Tomcat 6 + Jruby](https://www.ruby-forum.com/t/tomcat-6-jruby/146697)

<div class="topic-metadata">

**Author:** [@axelseaa](https://www.ruby-forum.com/u/axelseaa)\
**Replies:** 0\
**Last updated:** [August 24, 2008, 9:19am UTC](https://www.ruby-forum.com/t/tomcat-6-jruby/146697 "2008-08-24T09:19:25Z")

</div>

I’m trying to configure a server with Tomcat 6 and mod\_jk to serve up ruby on rails apps built with netbeans 6.1. Does anyone know if there are any issues? Sorry if this is a basic question, but I am very new to rub…

---

## [Detailed explanations/examples/references for oniguruma features?](https://www.ruby-forum.com/t/detailed-explanations-examples-references-for-oniguruma-features/146691)

<div class="topic-metadata">

**Author:** [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Replies:** 0\
**Last updated:** [August 24, 2008, 5:32am UTC](https://www.ruby-forum.com/t/detailed-explanations-examples-references-for-oniguruma-features/146691 "2008-08-24T05:32:32Z")

</div>

I have the basic reference sheet for oniguruma, but it would sure be nice to have (a lot) more comprehensive examples and explanations. There are a lot of neat but complex features that take some understanding. Thank…

---

## [Passing parameters into a singleton class def?](https://www.ruby-forum.com/t/passing-parameters-into-a-singleton-class-def/146685)

<div class="topic-metadata">

**Author:** [@carluva](https://www.ruby-forum.com/u/carluva)\
**Replies:** 3\
**Last updated:** [August 24, 2008, 4:07am UTC](https://www.ruby-forum.com/t/passing-parameters-into-a-singleton-class-def/146685 "2008-08-24T04:07:10Z")

</div>

Hi, I’m a little new to Ruby, so please feel free to suggest a completely different and better way to do this, if you have one. I’m trying to figure out a way to access a variable within a singleton class definition…

---

## [How to create a block consisting of multiple lines](https://www.ruby-forum.com/t/how-to-create-a-block-consisting-of-multiple-lines/146684)

<div class="topic-metadata">

**Author:** [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Replies:** 2\
**Last updated:** [August 24, 2008, 3:22am UTC](https://www.ruby-forum.com/t/how-to-create-a-block-consisting-of-multiple-lines/146684 "2008-08-24T03:22:39Z")

</div>

This works. class Person def hi(inputproc) inputproc.call end end Person.new.hi lambda { puts ‘wow1’; puts ‘wow2’} However when I try to split the code inside block in multiple line the code does NOT work anymore…

---

## [\[trunk\] fail to compile on Cygwin](https://www.ruby-forum.com/t/trunk-fail-to-compile-on-cygwin/146681)

<div class="topic-metadata">

**Author:** [@Masaki\_S](https://www.ruby-forum.com/u/Masaki_S)\
**Replies:** 0\
**Last updated:** [August 24, 2008, 2:31am UTC](https://www.ruby-forum.com/t/trunk-fail-to-compile-on-cygwin/146681 "2008-08-24T02:31:47Z")

</div>

e$B=uED$G$9!#e(B Cygwin e$B$G$Ne(B trunke$B$N%3%s%Q%$%k$,\<:GT$7$^$9!#e(B \[ruby-dev:35924\] e$B$O2r7h$5$l$^$7$?$,!"$=$N8e$G\<:GT$7$^$9!#e(B ./miniruby.exe -I…/…/…/…/svn/ruby/trunk/lib -I.ext/common -I./- -r…/…/…/…/svn/r…

---

## [YAML::load help](https://www.ruby-forum.com/t/yaml-load-help/146670)

<div class="topic-metadata">

**Author:** [@jayson](https://www.ruby-forum.com/u/jayson)\
**Replies:** 9\
**Last updated:** [August 24, 2008, 2:29am UTC](https://www.ruby-forum.com/t/yaml-load-help/146670 "2008-08-24T02:29:27Z")

</div>

I have a hash of Structs that I am trying to save and load to a file using YAML. I am able to save the YAML output to file, but when I use var=YAML::load(File.open(‘file’)) to load the data back in, var does not look …

---

## [Until method.is\_called?](https://www.ruby-forum.com/t/until-method-is-called/146661)

<div class="topic-metadata">

**Author:** [@enchanter](https://www.ruby-forum.com/u/enchanter)\
**Replies:** 2\
**Last updated:** [August 23, 2008, 10:36pm UTC](https://www.ruby-forum.com/t/until-method-is-called/146661 "2008-08-23T22:36:07Z")

</div>

is there a way to settup an until loop ‘until’ a method is called? Is it possible currently? Something like this: until Klass.sometin.is-called? do … end thanks for the help

---

## [Flickraw - I need help to install it](https://www.ruby-forum.com/t/flickraw-i-need-help-to-install-it/146672)

<div class="topic-metadata">

**Author:** [@consultor](https://www.ruby-forum.com/u/consultor)\
**Replies:** 0\
**Last updated:** [August 23, 2008, 10:23pm UTC](https://www.ruby-forum.com/t/flickraw-i-need-help-to-install-it/146672 "2008-08-23T22:23:36Z")

</div>

Hi all forum. Can I ask for your help to install Flickraw? I was using it (v0-4-2) without any inconvenient but, a couple of weeks ago I uninstalled it and I installed the last version and now I am having errors (plea…

---

## [Gem install mechanize; Windows](https://www.ruby-forum.com/t/gem-install-mechanize-windows/146616)

<div class="topic-metadata">

**Author:** [@jtucker](https://www.ruby-forum.com/u/jtucker)\
**Replies:** 1\
**Last updated:** [August 23, 2008, 9:13pm UTC](https://www.ruby-forum.com/t/gem-install-mechanize-windows/146616 "2008-08-23T21:13:25Z")

</div>

Um… D:/ruby/bin/ruby.exe extconf.rb install mechanize checking for stdio.h… no \*\*\* extconf.rb failed \*\*\* Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the …

---

## [ANSICode Regexp?](https://www.ruby-forum.com/t/ansicode-regexp/146656)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 1\
**Last updated:** [August 23, 2008, 8:16pm UTC](https://www.ruby-forum.com/t/ansicode-regexp/146656 "2008-08-23T20:16:40Z")

</div>

Can anyone give me a Regexp to match ANSIcodes. I’ve tried: /\\e\[\[0-9\]\*\\w/ And lots of variations there-of. The problem seems to be that first ‘’ is never in the regexp. T.

---

## [Not So Random (#173)](https://www.ruby-forum.com/t/not-so-random-173/146537)

<div class="topic-metadata">

**Author:** [@mansfiem](https://www.ruby-forum.com/u/mansfiem)\
**Replies:** 1\
**Last updated:** [August 23, 2008, 6:11pm UTC](https://www.ruby-forum.com/t/not-so-random-173/146537 "2008-08-23T18:11:27Z")

</div>

Apologies for the late summary… I’m moving to a new place today, tomorrow, this weekend… and start classes on Monday. Also, look for the next quiz to show up this Saturday, not tomorrow. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-…

---

## [\[Bug:1.9\] default\_external depends on the order of -K and -E](https://www.ruby-forum.com/t/bug-1-9-default-external-depends-on-the-order-of-k-and-e/144856)

<div class="topic-metadata">

**Author:** [@sheepman](https://www.ruby-forum.com/u/sheepman)\
**Replies:** 8\
**Last updated:** [August 23, 2008, 5:13pm UTC](https://www.ruby-forum.com/t/bug-1-9-default-external-depends-on-the-order-of-k-and-e/144856 "2008-08-23T17:13:31Z")

</div>

e$B$3$s$K$A$Oe(B sheepman e$B$G$9!#e(B Encoding.default\_external e$B$Oe(B -K e$B%%W%7%g%s$He(B -E e$B%%W%7%g%s$Ne(B e$B=gHV$K0MB8$9$k$h$&$G$9$,!"$3$&$$$&$b$N$J$s$G$7$g$&$+!#e(B $ ruby-1.9 -v ruby 1.9.0 (2008-08-03 r…

---

## [Gsub HELP](https://www.ruby-forum.com/t/gsub-help/146627)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 4\
**Last updated:** [August 23, 2008, 4:16pm UTC](https://www.ruby-forum.com/t/gsub-help/146627 "2008-08-23T16:16:09Z")

</div>

Hi all I am not Expert at Rails or Ruby I have a string …it contains text and images also… from that string i want to replace the images into empty space…that is images Has to Be Removed. I tried to solve By using s…

---

## [Fools Filing](https://www.ruby-forum.com/t/fools-filing/146224)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 6\
**Last updated:** [August 23, 2008, 4:00pm UTC](https://www.ruby-forum.com/t/fools-filing/146224 "2008-08-23T16:00:56Z")

</div>

Ya know, it always seems like I’m jump’n all around with these file/ dir related classes/modules/methods. We have: File Dir FileTest FileUtils Pathname Not to mention the String we often use to store the filename. I…

---

## [Md5sums/sha1sums for ftp sources](https://www.ruby-forum.com/t/md5sums-sha1sums-for-ftp-sources/146614)

<div class="topic-metadata">

**Author:** [@john\_maclean](https://www.ruby-forum.com/u/john_maclean)\
**Replies:** 1\
**Last updated:** [August 23, 2008, 2:49pm UTC](https://www.ruby-forum.com/t/md5sums-sha1sums-for-ftp-sources/146614 "2008-08-23T14:49:29Z")

</div>

It seems as if there is an md5sum file to list the files in ftp://ruby-lang.doc/doc but not for the ruby sources for the stable and 1.9. How come? As far as the 1.9 series is concerned, are the even numbers stable or …

---

## [How do I iitialze this class?](https://www.ruby-forum.com/t/how-do-i-iitialze-this-class/146642)

<div class="topic-metadata">

**Author:** [@jsn1](https://www.ruby-forum.com/u/jsn1)\
**Replies:** 1\
**Last updated:** [August 23, 2008, 1:58pm UTC](https://www.ruby-forum.com/t/how-do-i-iitialze-this-class/146642 "2008-08-23T13:58:00Z")

</div>

When I try to initialize this class class Ticket def event $event end end ticket = Ticket.new(“Can’t really be specified yet…”) puts ticket.event I get an error message: undefined method \`event’ for nil:NilClass …

---

## [\[Bug #467\] Failure: test\_rlimit\_value(TestProcess)](https://www.ruby-forum.com/t/bug-467-failure-test-rlimit-value-testprocess/146471)

<div class="topic-metadata">

**Author:** [@Kazuhiro\_NISHIYAMA](https://www.ruby-forum.com/u/Kazuhiro_NISHIYAMA)\
**Replies:** 1\
**Last updated:** [August 23, 2008, 1:08pm UTC](https://www.ruby-forum.com/t/bug-467-failure-test-rlimit-value-testprocess/146471 "2008-08-23T13:08:50Z")

</div>

Bug #467: Failure: test\_rlimit\_value(TestProcess) http://redmine.ruby-lang.org/issues/show/467 e$B5/I\<\<Te(B: Kazuhiro NISHIYAMA e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal ruby 1.9.0 (2008-08-21 revision 18741) \[pow…

---

## [Regular expression help](https://www.ruby-forum.com/t/regular-expression-help/146639)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 2\
**Last updated:** [August 23, 2008, 12:11pm UTC](https://www.ruby-forum.com/t/regular-expression-help/146639 "2008-08-23T12:11:47Z")

</div>

Hi all I am Trying To sort Out This Proble for the past 4 Hours…But couldn’t Find Any Solutions I have a string …it contains text and images also…from that string i want to replace the All The Images Into Empty space…

---

## [\[Bug #464\] \`Errno::ENOTCONN: Socket is not connected' in test/openssl/test\_ssl.rb](https://www.ruby-forum.com/t/bug-464-errno-socket-is-not-connected-in-test-openssl-test-ssl-rb/146462)

<div class="topic-metadata">

**Author:** [@Kazuhiro\_NISHIYAMA](https://www.ruby-forum.com/u/Kazuhiro_NISHIYAMA)\
**Replies:** 1\
**Last updated:** [August 23, 2008, 11:57am UTC](https://www.ruby-forum.com/t/bug-464-errno-socket-is-not-connected-in-test-openssl-test-ssl-rb/146462 "2008-08-23T11:57:27Z")

</div>

Bug #464: \`Errno::ENOTCONN: Socket is not connected’ in test/openssl/test\_ssl.rb http://redmine.ruby-lang.org/issues/show/464 e$B5/I\<\<Te(B: Kazuhiro NISHIYAMA e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$BC4Ev\<Te(…

---

## [\[Bug #465\] \`Errno::ENOTCONN: Socket is not connected' in test/net/imap](https://www.ruby-forum.com/t/bug-465-errno-socket-is-not-connected-in-test-net-imap/146464)

<div class="topic-metadata">

**Author:** [@Kazuhiro\_NISHIYAMA](https://www.ruby-forum.com/u/Kazuhiro_NISHIYAMA)\
**Replies:** 1\
**Last updated:** [August 23, 2008, 11:57am UTC](https://www.ruby-forum.com/t/bug-465-errno-socket-is-not-connected-in-test-net-imap/146464 "2008-08-23T11:57:27Z")

</div>

Bug #465: \`Errno::ENOTCONN: Socket is not connected’ in test/net/imap http://redmine.ruby-lang.org/issues/show/465 e$B5/I\<\<Te(B: Kazuhiro NISHIYAMA e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$BC4Ev\<Te(B: GOTOU Yuu…

---

## [\[Bug #463\] \`Errno::ENOTCONN: Socket is not connected' in test/net/http](https://www.ruby-forum.com/t/bug-463-errno-socket-is-not-connected-in-test-net-http/146453)

<div class="topic-metadata">

**Author:** [@Kazuhiro\_NISHIYAMA](https://www.ruby-forum.com/u/Kazuhiro_NISHIYAMA)\
**Replies:** 1\
**Last updated:** [August 23, 2008, 11:56am UTC](https://www.ruby-forum.com/t/bug-463-errno-socket-is-not-connected-in-test-net-http/146453 "2008-08-23T11:56:52Z")

</div>

Bug #463: \`Errno::ENOTCONN: Socket is not connected’ in test/net/http http://redmine.ruby-lang.org/issues/show/463 e$B5/I\<\<Te(B: Kazuhiro NISHIYAMA e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$BC4Ev\<Te(B: GOTOU Yuu…

---

## [DateTime in UTC](https://www.ruby-forum.com/t/datetime-in-utc/146557)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 8\
**Last updated:** [August 23, 2008, 11:34am UTC](https://www.ruby-forum.com/t/datetime-in-utc/146557 "2008-08-23T11:34:37Z")

</div>

How do I extract the hour and minutes in UTC from a DateTime object? I have looked at the Ruby cookbook and Ruby Way with no luck. When I try: d = DateTime.new(2008,8, 20, 12, 15) =\> Wed, 20 Aug 2008 12:15:00 +0000 …

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

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