# Ruby

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

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

---

## [Iconv::IllegalSequence#failed](https://www.ruby-forum.com/t/iconv-illegalsequence-failed/128498)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [February 8, 2008, 5:49am UTC](https://www.ruby-forum.com/t/iconv-illegalsequence-failed/128498 "2008-02-08T05:49:09Z")

</div>

Iconv::IllegalSequence#failed e$B$,\<:GT$7$?\>l=j$+$i$Ne(B String e$B$re(B e$BJV$5$J$$$3$H$,$"$j$^$9!#e(B % ./ruby -riconv -e 'ic = Iconv.new(“euc-jp”, “euc-jp”); s = “\\xa4\\xa2\\xa4\\xa4\\x8fabc”.force\_encoding(“euc-jp”) …

---

## [How to add string objects to hash?](https://www.ruby-forum.com/t/how-to-add-string-objects-to-hash/128133)

<div class="topic-metadata">

**Author:** [@martin\_mercy2001](https://www.ruby-forum.com/u/martin_mercy2001)\
**Replies:** 8\
**Last updated:** [February 8, 2008, 4:45am UTC](https://www.ruby-forum.com/t/how-to-add-string-objects-to-hash/128133 "2008-02-08T04:45:26Z")

</div>

Dear friends, I have created a string buffer. I have read character by character from buffer using a method and stored in a string object like, @test = String.new The method iteration process continues till @flag=1…

---

## [Blackbook 1.0.0 Released](https://www.ruby-forum.com/t/blackbook-1-0-0-released/127882)

<div class="topic-metadata">

**Author:** [@Dave\_Myron](https://www.ruby-forum.com/u/Dave_Myron)\
**Replies:** 2\
**Last updated:** [February 8, 2008, 4:19am UTC](https://www.ruby-forum.com/t/blackbook-1-0-0-released/127882 "2008-02-08T04:19:18Z")

</div>

blackbook version 1.0.0 has been released! http://rubyforge.org/projects/contentfree/ DESCRIPTION: Blackbook automates the nitty-gritty of importing contacts from various services and files and exporting them as VCa…

---

## [Non-blocking SSL handshake](https://www.ruby-forum.com/t/non-blocking-ssl-handshake/128359)

<div class="topic-metadata">

**Author:** [@murfhy](https://www.ruby-forum.com/u/murfhy)\
**Replies:** 3\
**Last updated:** [February 8, 2008, 2:36am UTC](https://www.ruby-forum.com/t/non-blocking-ssl-handshake/128359 "2008-02-08T02:36:12Z")

</div>

Hello. I’m attempting to use SSL within my Fiber-based Actor framework ( http://revactor.org) and running into problems incorporating SSL. As far as I can discern, OpenSSL::SSL::SSLSocket#sysread and #syswrite are …

---

## [New user - very basic question](https://www.ruby-forum.com/t/new-user-very-basic-question/128469)

<div class="topic-metadata">

**Author:** [@ashleyw](https://www.ruby-forum.com/u/ashleyw)\
**Replies:** 4\
**Last updated:** [February 8, 2008, 2:15am UTC](https://www.ruby-forum.com/t/new-user-very-basic-question/128469 "2008-02-08T02:15:42Z")

</div>

Hi - sorry to bother with such a basic question, but is there a better way to write the following: (before I move on I want to make sure I am following best practice) def require\_number number\_cur puts number\_cur …

---

## [Difference between class\_eval and just adding the function?](https://www.ruby-forum.com/t/difference-between-class-eval-and-just-adding-the-function/128488)

<div class="topic-metadata">

**Author:** [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Replies:** 1\
**Last updated:** [February 8, 2008, 1:24am UTC](https://www.ruby-forum.com/t/difference-between-class-eval-and-just-adding-the-function/128488 "2008-02-08T01:24:38Z")

</div>

Lets say I have module A class B def t puts “hi” end end end And I want to add a function to it. Whats the difference between: module A class B def new\_function puts “foo” end end end AND A::B.class\_eval…

---

## [Thin 0.6.3 Ninja Cookie release](https://www.ruby-forum.com/t/thin-0-6-3-ninja-cookie-release/128483)

<div class="topic-metadata">

**Author:** [@macournoyer](https://www.ruby-forum.com/u/macournoyer)\
**Replies:** 0\
**Last updated:** [February 8, 2008, 12:37am UTC](https://www.ruby-forum.com/t/thin-0-6-3-ninja-cookie-release/128483 "2008-02-08T00:37:07Z")

</div>

Hey all, Version 0.6.3 (codename Ninja Cookie) of the fastest Ruby server is out! http://code.macournoyer.com/thin/ == What’s new? Thin is now more flexible and extensible then ever and even easier to deploy! Chang…

---

## [Dynamically instantiate a class](https://www.ruby-forum.com/t/dynamically-instantiate-a-class/128367)

<div class="topic-metadata">

**Author:** [@macaco](https://www.ruby-forum.com/u/macaco)\
**Replies:** 5\
**Last updated:** [February 8, 2008, 12:20am UTC](https://www.ruby-forum.com/t/dynamically-instantiate-a-class/128367 "2008-02-08T00:20:05Z")

</div>

Hi. I’ve been wondering if I can instantiate during execution, I have this subclasses, but I don’t know how to do it by their name as a string. This is what I mean: class superClass … end class subClass1 \< superCl…

---

## [File and directory handling and management](https://www.ruby-forum.com/t/file-and-directory-handling-and-management/128476)

<div class="topic-metadata">

**Author:** [@gberz3](https://www.ruby-forum.com/u/gberz3)\
**Replies:** 0\
**Last updated:** [February 7, 2008, 11:56pm UTC](https://www.ruby-forum.com/t/file-and-directory-handling-and-management/128476 "2008-02-07T23:56:00Z")

</div>

Hi All, I’m interested in any gems and/or established “best practices” for managing files and directories across platforms. Are there any “special folder items” (or gems that handle them) in ruby? For instance, it …

---

## [XML Parser (SOAP Request)](https://www.ruby-forum.com/t/xml-parser-soap-request/128357)

<div class="topic-metadata">

**Author:** [@eder](https://www.ruby-forum.com/u/eder)\
**Replies:** 5\
**Last updated:** [February 7, 2008, 11:07pm UTC](https://www.ruby-forum.com/t/xml-parser-soap-request/128357 "2008-02-07T23:07:09Z")

</div>

First of all, sorry for my English. Hello, I’ve been working on a new MSNP (Version 13) client for Ruby, the only problem that I Have is that this version of the protocol has lots of SOAP Requests and I’ve been trying…

---

## [Trying to SNMP poll ifDescription](https://www.ruby-forum.com/t/trying-to-snmp-poll-ifdescription/128468)

<div class="topic-metadata">

**Author:** [@jackster](https://www.ruby-forum.com/u/jackster)\
**Replies:** 0\
**Last updated:** [February 7, 2008, 10:52pm UTC](https://www.ruby-forum.com/t/trying-to-snmp-poll-ifdescription/128468 "2008-02-07T22:52:07Z")

</div>

I’m using SNMP::Manager to poll some network devices. I can successfully poll ifName, ifDescr but not ifDescription (iso.3.6.1.2.1.31.1.1.1.18) for some reason. I believe I have the right oid here…maybe someone can co…

---

## [Getting SNMP data in variable instead of using puts](https://www.ruby-forum.com/t/getting-snmp-data-in-variable-instead-of-using-puts/128330)

<div class="topic-metadata">

**Author:** [@jackster](https://www.ruby-forum.com/u/jackster)\
**Replies:** 2\
**Last updated:** [February 7, 2008, 10:47pm UTC](https://www.ruby-forum.com/t/getting-snmp-data-in-variable-instead-of-using-puts/128330 "2008-02-07T22:47:20Z")

</div>

I’m trying to access my variable directly here rather than using puts to print it out. Can anyone tell me the easiest way to access it from the variable? ipadd = ARGV\[0\] columns = \[“ifDescr”\] SNMP::Manager.open(:Hos…

---

## [Ruby/Tk/Iwidgets tabnotebook (and scrollbar)](https://www.ruby-forum.com/t/ruby-tk-iwidgets-tabnotebook-and-scrollbar/127426)

<div class="topic-metadata">

**Author:** [@kmeister2000](https://www.ruby-forum.com/u/kmeister2000)\
**Replies:** 4\
**Last updated:** [February 7, 2008, 10:29pm UTC](https://www.ruby-forum.com/t/ruby-tk-iwidgets-tabnotebook-and-scrollbar/127426 "2008-02-07T22:29:37Z")

</div>

Hi I’ve created an iwidgets tabnotebook, with a large number of tabs, and attached a scrollbar. Moving the scroll bar successfully moves back and forth amongst pages, but the subset of tabs displayed does not change. …

---

## [ARGF.lineno](https://www.ruby-forum.com/t/argf-lineno/128453)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [February 7, 2008, 8:28pm UTC](https://www.ruby-forum.com/t/argf-lineno/128453 "2008-02-07T20:28:15Z")

</div>

e$B$k$S$-$A$G$9!#e(B ARGF.linenoe$B$Oe(BRuby 1.9e$B$@$H=hM}Cf$N%U%!%$%k$N9THV9f$rJV$9;EMM$KJQ$o$C$?$N$G$9$+!)e(B RUBY\_VERSION # =\> “1.8.6” RUBY\_RELEASE\_DATE # =\> “2007-09-24” ARGV.re…

---

## [Parsing JSON (#155)](https://www.ruby-forum.com/t/parsing-json-155/127817)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 85\
**Last updated:** [February 7, 2008, 4:39pm UTC](https://www.ruby-forum.com/t/parsing-json-155/127817 "2008-02-07T16:39:30Z")

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

---

## [How to test monkey patching code?](https://www.ruby-forum.com/t/how-to-test-monkey-patching-code/128412)

<div class="topic-metadata">

**Author:** [@pluskid](https://www.ruby-forum.com/u/pluskid)\
**Replies:** 1\
**Last updated:** [February 7, 2008, 3:27pm UTC](https://www.ruby-forum.com/t/how-to-test-monkey-patching-code/128412 "2008-02-07T15:27:32Z")

</div>

Hi, all! I’m wondering how to test some monkey patching code. Take the standard library ‘jcode’ in Ruby 1.8 for example. It do some monkey patching for the core String class when I require it. If I want to write som…

---

## [Calling a testcase from another class](https://www.ruby-forum.com/t/calling-a-testcase-from-another-class/128275)

<div class="topic-metadata">

**Author:** [@tcblues](https://www.ruby-forum.com/u/tcblues)\
**Replies:** 7\
**Last updated:** [February 7, 2008, 1:50pm UTC](https://www.ruby-forum.com/t/calling-a-testcase-from-another-class/128275 "2008-02-07T13:50:33Z")

</div>

Hi everybody, I have a few classes containing a few tescase methods. I would like to create a new class in order to run different tescases methods of different classes: file: testcases/myclass1.rb class Myclass1 \< T…

---

## [Getting StringIO in Mozilla and String in Safari for file up](https://www.ruby-forum.com/t/getting-stringio-in-mozilla-and-string-in-safari-for-file-up/128402)

<div class="topic-metadata">

**Author:** [@saravanankrishnan](https://www.ruby-forum.com/u/saravanankrishnan)\
**Replies:** 1\
**Last updated:** [February 7, 2008, 11:50am UTC](https://www.ruby-forum.com/t/getting-stringio-in-mozilla-and-string-in-safari-for-file-up/128402 "2008-02-07T11:50:02Z")

</div>

Hi Folks, When i try to upload files, its working in both Mozilla and IE. But It’s not working in Safari. The reason is,mozilla has StringIO class and safari has string class. My controller codings are based on …

---

## [Run WIN32OLE.codepage= in ruby 1.8.2](https://www.ruby-forum.com/t/run-win32ole-codepage-in-ruby-1-8-2/128395)

<div class="topic-metadata">

**Author:** [@idanmiller](https://www.ruby-forum.com/u/idanmiller)\
**Replies:** 0\
**Last updated:** [February 7, 2008, 10:44am UTC](https://www.ruby-forum.com/t/run-win32ole-codepage-in-ruby-1-8-2/128395 "2008-02-07T10:44:18Z")

</div>

Hi everyone, I’m trying to run WIN32OLE.codepage= in ruby 1.8.2 but get a method not found error. How should I access the same functionality in ruby 1.8.2? Since I’m using watir and wish to use the modal\_dialog method…

---

## [Got error in mongrel\_cluster](https://www.ruby-forum.com/t/got-error-in-mongrel-cluster/128376)

<div class="topic-metadata">

**Author:** [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Replies:** 1\
**Last updated:** [February 7, 2008, 10:42am UTC](https://www.ruby-forum.com/t/got-error-in-mongrel-cluster/128376 "2008-02-07T10:42:15Z")

</div>

hi all, I configure the mongrel\_cluster in my application but i got error in mongrel.3010.log file like this \*\* Daemonized, any open files are closed. Look at tmp/pids/mongrel.3010.pid and log/mongrel.3010.log for i…

---

## [Ext/digest/rmd160 $B$G%3%s%Q%$%k$NLdBj(B](https://www.ruby-forum.com/t/ext-digest-rmd160-b-g-3-s-q-k-nldbj-b/128397)

<div class="topic-metadata">

**Author:** [@drenovac](https://www.ruby-forum.com/u/drenovac)\
**Replies:** 0\
**Last updated:** [February 7, 2008, 10:19am UTC](https://www.ruby-forum.com/t/ext-digest-rmd160-b-g-3-s-q-k-nldbj-b/128397 "2008-02-07T10:19:13Z")

</div>

e$B8=:\_e(B (r15396) ext/digest/rmd160 e$B$G%a!\<%/$N%(%i!\<$K$J$j$^$9!#e(B e$B59$7$/$\*4j$$$7$^$9!#e(B Martin. #-#-# Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University #-#-# http://www.sw.it.aoyama.ac.jp …

---

## [Extensions: Init\_extension exists, looking for Deinit\_extension](https://www.ruby-forum.com/t/extensions-init-extension-exists-looking-for-deinit-extension/128063)

<div class="topic-metadata">

**Author:** [@daniel\_SSSSkerud](https://www.ruby-forum.com/u/daniel_SSSSkerud)\
**Replies:** 3\
**Last updated:** [February 7, 2008, 8:44am UTC](https://www.ruby-forum.com/t/extensions-init-extension-exists-looking-for-deinit-extension/128063 "2008-02-07T08:44:49Z")

</div>

I am allocating a resource in Init\_extension, that is, when the .so file is loaded. I am looking for a way to deallocate this resource even though no object has been created with the extension, in other words, I cann…

---

## [Re: Parsing JSON (#155)](https://www.ruby-forum.com/t/re-parsing-json-155/128375)

<div class="topic-metadata">

**Author:** [@jameskelly](https://www.ruby-forum.com/u/jameskelly)\
**Replies:** 0\
**Last updated:** [February 7, 2008, 5:07am UTC](https://www.ruby-forum.com/t/re-parsing-json-155/128375 "2008-02-07T05:07:40Z")

</div>

class StringIO def strip! ch = read(1) ch = read(1) while /\\s/ =~ ch ungetc ch\[0\] self end def sees?(str1) str2 = read(str1.length) str2.reverse.scan(/./) {|ch| ungetc ch\[0\]} str2 == str1 end alias oldread re…

---

## [How to put hash values in function](https://www.ruby-forum.com/t/how-to-put-hash-values-in-function/128362)

<div class="topic-metadata">

**Author:** [@nephish](https://www.ruby-forum.com/u/nephish)\
**Replies:** 3\
**Last updated:** [February 7, 2008, 4:24am UTC](https://www.ruby-forum.com/t/how-to-put-hash-values-in-function/128362 "2008-02-07T04:24:15Z")

</div>

Hey there, i have an example function from documentation. it looks like this do\_something(SomeValue, 2 =\> ‘value’, 3 =\> ‘value’, 4 =\> ‘value’, someVar, someOtherVar) now if i have a hash that has more or less value…

---

## [Command-set 0.10.0 Released](https://www.ruby-forum.com/t/command-set-0-10-0-released/128372)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [February 7, 2008, 3:53am UTC](https://www.ruby-forum.com/t/command-set-0-10-0-released/128372 "2008-02-07T03:53:12Z")

</div>

command-set version 0.10.0 has been released! CommandSet is a interactive program framework. Its focus is a DSL for defining commands, much like Rake or RSpec. The actual interpreter is left as an open question, alt…

---

## [Re: cgi.rb$B:F9=C\[0F(B](https://www.ruby-forum.com/t/re-cgi-rb-b-f9-c-0f-b/127984)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 16\
**Last updated:** [February 7, 2008, 3:43am UTC](https://www.ruby-forum.com/t/re-cgi-rb-b-f9-c-0f-b/127984 "2008-02-07T03:43:48Z")

</div>

e$B7,ED$H$$$$$^$9!#e(B e$B$k$S$-$A$G$9!#e(B cgi.rbe$B$Ne(BCGI::TagMakere$B!“e(BCGI::HtmlExtensione$BEy$r;H$C$F$$$k?M$O$$$k$G$7$g$&$+!)e(B e$B$”$^$j;H$o$l$F$$$J$$$N$G$"$l$P!"e(Bcgi/html.rbe$B$H$+$KJ,N%$7$?$\[$&$,$$$$5$…

---

## [AP4R 0.3.6 Released](https://www.ruby-forum.com/t/ap4r-0-3-6-released/128365)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [February 7, 2008, 3:10am UTC](https://www.ruby-forum.com/t/ap4r-0-3-6-released/128365 "2008-02-07T03:10:55Z")

</div>

Hi all, ap4r version 0.3.6 has been released. = What is AP4R ? AP4R, Asynchronous Processing for Ruby, is the implementation of reliable asynchronous message processing. It provides message queuing, and message disp…

---

## [The future of Ruby.NET](https://www.ruby-forum.com/t/the-future-of-ruby-net/128141)

<div class="topic-metadata">

**Author:** [@Slavo\_F](https://www.ruby-forum.com/u/Slavo_F)\
**Replies:** 10\
**Last updated:** [February 7, 2008, 2:58am UTC](https://www.ruby-forum.com/t/the-future-of-ruby-net/128141 "2008-02-07T02:58:02Z")

</div>

hi! Just in case someone do not seen this yet. http://groups.google.com/group/RubyDOTNET/browse\_thread/thread/1752830c857620b0 regards, Slavo.

---

## [Math.lgamma and Math.gamma](https://www.ruby-forum.com/t/math-lgamma-and-math-gamma/128313)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 1\
**Last updated:** [February 7, 2008, 2:19am UTC](https://www.ruby-forum.com/t/math-lgamma-and-math-gamma/128313 "2008-02-07T02:19:58Z")

</div>

e$B$U$H!“e(Blog2(nCm) e$B$N%0%i%U$r=q$$$F$\_$h$&$H;W$C$?$N$G$9$,!“e(BnCm e$B$N7W;;$K3,\>h$,I,MW$G!”$3$l$r$U$D$&$K7W;;$9$k$N$O%k!\<%W$,I,MWe(B e$B$G$+$J$jCY$/!”&#4X?t$,e(B (e$B@53N$K$O%\*!\<%P!\<%U%m!\<$rHr$1$kI,MW\>e!“e(B e$…

---

## [Weird performance problem with "find"](https://www.ruby-forum.com/t/weird-performance-problem-with-find/128333)

<div class="topic-metadata">

**Author:** [@nielsene](https://www.ruby-forum.com/u/nielsene)\
**Replies:** 11\
**Last updated:** [February 7, 2008, 2:12am UTC](https://www.ruby-forum.com/t/weird-performance-problem-with-find/128333 "2008-02-07T02:12:55Z")

</div>

I noticed some strange issues in an application I’m working on where it works speedy at first, and then gets progressively slower and slower. After a little bit of investigation, it seems that Enumerable#find is the …

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

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