# Ruby

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

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

---

## [Huffman Encoder (#123)](https://www.ruby-forum.com/t/huffman-encoder-123/104393)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [May 17, 2007, 2:00pm UTC](https://www.ruby-forum.com/t/huffman-encoder-123/104393 "2007-05-17T14:00:08Z")

</div>

With the extra credits, this problem is a little involved and some people did write a lot of code for it. Building the tree was our main interest in this problem though. The quiz didn’t detail that process too much…

---

## [Connecting to sap in ruby](https://www.ruby-forum.com/t/connecting-to-sap-in-ruby/99935)

<div class="topic-metadata">

**Author:** [@inari](https://www.ruby-forum.com/u/inari)\
**Replies:** 6\
**Last updated:** [May 17, 2007, 1:55pm UTC](https://www.ruby-forum.com/t/connecting-to-sap-in-ruby/99935 "2007-05-17T13:55:13Z")

</div>

Hello guys, I am researching on how to connect to sap using ruby scripting. Well, I have found some websites that talks about connecting ruby to sap and most of their idea is to use SAP::RFC to connect to sap in ruby.…

---

## [Testing XMLRPC::Servers](https://www.ruby-forum.com/t/testing-xmlrpc-servers/104381)

<div class="topic-metadata">

**Author:** [@regularfry](https://www.ruby-forum.com/u/regularfry)\
**Replies:** 2\
**Last updated:** [May 17, 2007, 1:43pm UTC](https://www.ruby-forum.com/t/testing-xmlrpc-servers/104381 "2007-05-17T13:43:07Z")

</div>

Hi all, Has anybody looked at cloning XMLRPC::Server instances to run tests suites against? My problem at the moment is that I’ve got a batch of tests that each need to run against a fresh XMLRPC::Server instance. S…

---

## [Parsing output](https://www.ruby-forum.com/t/parsing-output/104305)

<div class="topic-metadata">

**Author:** [@anon1m0us](https://www.ruby-forum.com/u/anon1m0us)\
**Replies:** 9\
**Last updated:** [May 17, 2007, 1:11pm UTC](https://www.ruby-forum.com/t/parsing-output/104305 "2007-05-17T13:11:05Z")

</div>

Hi; I have a command to obtain all the groups a user is part of. The command is: dsquery user domainroot -samid | dsget user -memberof - expand The output is: “CN=Domain Users,CN=Users,DC=testdc,DC=testroot,DC=test…

---

## [TreeWidgetItem problem](https://www.ruby-forum.com/t/treewidgetitem-problem/104378)

<div class="topic-metadata">

**Author:** [@miquel](https://www.ruby-forum.com/u/miquel)\
**Replies:** 5\
**Last updated:** [May 17, 2007, 1:08pm UTC](https://www.ruby-forum.com/t/treewidgetitem-problem/104378 "2007-05-17T13:08:05Z")

</div>

Hi there I’m trying to code a Tree using ruby qt bindings (Qt v4.2.0 using aboutQt() info). This is my code. @tree = Qt::TreeWidget.new(self) self.setCentralWidget(@tree) @rootItem = Qt::TreeWidgetItem.new(@tree) @…

---

## [Gem releasing with Hoe: VERSION environment variable require](https://www.ruby-forum.com/t/gem-releasing-with-hoe-version-environment-variable-require/104325)

<div class="topic-metadata">

**Author:** [@Vassilis\_R](https://www.ruby-forum.com/u/Vassilis_R)\
**Replies:** 1\
**Last updated:** [May 17, 2007, 12:17pm UTC](https://www.ruby-forum.com/t/gem-releasing-with-hoe-version-environment-variable-require/104325 "2007-05-17T12:17:24Z")

</div>

I want to upload a gem to rubyforge and I am using Hoe to do it. When I do rake release it stops with the message Must supply VERSION=x.y.z after creating the gem. Hoe s v1.2.0. Looking into the code I see: task :re…

---

## [CGI and re-direction](https://www.ruby-forum.com/t/cgi-and-re-direction/104348)

<div class="topic-metadata">

**Author:** [@tobyr](https://www.ruby-forum.com/u/tobyr)\
**Replies:** 3\
**Last updated:** [May 17, 2007, 11:22am UTC](https://www.ruby-forum.com/t/cgi-and-re-direction/104348 "2007-05-17T11:22:51Z")

</div>

I have written a simple CGI script. It loads in an object, and prints out a few of its attributes. I would like to add some check-boxes such that when I hit the submit button some other booleans get set, it accesses …

---

## [\[BUG on Ruby?\] Ruby/Tk on Ruby1.8.\[56\] is too slow on Windo](https://www.ruby-forum.com/t/bug-on-ruby-ruby-tk-on-ruby1-8-56-is-too-slow-on-windo/104280)

<div class="topic-metadata">

**Author:** [@Hidetoshi\_NAGAI](https://www.ruby-forum.com/u/Hidetoshi_NAGAI)\
**Replies:** 6\
**Last updated:** [May 17, 2007, 9:44am UTC](https://www.ruby-forum.com/t/bug-on-ruby-ruby-tk-on-ruby1-8-56-is-too-slow-on-windo/104280 "2007-05-17T09:44:08Z")

</div>

e$B1J0f!wCNG=!%6e9)Bg$G$9!%e(B One-Click Ruby Installer e$B$G$7$+3NG’$7$F$O$$$J$$$N$G$9$,!$e(B Windows e$B\>e$Ne(B Ruby/Tk e$B$NF0:n$,6KEY$KCY$/$J$C$F$$$^$9!%e(B Widget Demo e$B$Ne(B Canvas Widget e$B$N%G%b$N!V%U%m%"%W…

---

## [Rb\_yield(), semaphores and 'break'](https://www.ruby-forum.com/t/rb-yield-semaphores-and-break/104264)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 10\
**Last updated:** [May 17, 2007, 9:10am UTC](https://www.ruby-forum.com/t/rb-yield-semaphores-and-break/104264 "2007-05-17T09:10:06Z")

</div>

I’ve run into a problem that sounds superficially similar to the one that Noah E. posted around a month ago, but I don’t think the suggested solutions work for me. Here’s the sitch… I’m working on an extension to han…

---

## [Buffer in TCPSocket when communicating via 127.0.0.1?](https://www.ruby-forum.com/t/buffer-in-tcpsocket-when-communicating-via-127-0-0-1/104309)

<div class="topic-metadata">

**Author:** [@Felipe\_N](https://www.ruby-forum.com/u/Felipe_N)\
**Replies:** 2\
**Last updated:** [May 17, 2007, 7:24am UTC](https://www.ruby-forum.com/t/buffer-in-tcpsocket-when-communicating-via-127-0-0-1/104309 "2007-05-17T07:24:58Z")

</div>

I’m using the TCPSocket.send, TCPSocket.gets and TCPSocket.gets to make communication between a ruby script and a C program in Linux. I’m experiencing some troubles with synchronization and lag. There is no problem wi…

---

## [Can't get subgroup of regex to repeat with +... what the?](https://www.ruby-forum.com/t/cant-get-subgroup-of-regex-to-repeat-with-what-the/104339)

<div class="topic-metadata">

**Author:** [@jon](https://www.ruby-forum.com/u/jon)\
**Replies:** 8\
**Last updated:** [May 17, 2007, 6:22am UTC](https://www.ruby-forum.com/t/cant-get-subgroup-of-regex-to-repeat-with-what-the/104339 "2007-05-17T06:22:55Z")

</div>

I’m trying to match these kinds of malformatted xml tags. I’m beginning to question my sanity, so i’m posting here. Example Strings: A=" " B=" " C=" " I’ve come up with this regex: /\<(\\w+?)(?:\\s(\\w+)=(\\w+))+\>/ But wh…

---

## [Regex html](https://www.ruby-forum.com/t/regex-html/104226)

<div class="topic-metadata">

**Author:** [@flnative](https://www.ruby-forum.com/u/flnative)\
**Replies:** 10\
**Last updated:** [May 17, 2007, 1:44am UTC](https://www.ruby-forum.com/t/regex-html/104226 "2007-05-17T01:44:37Z")

</div>

Hi everybody I want to filter the content of a body-Tag in html. How can I do this with regular expression? @h = Net::HTTP.new(url, 80) @response = @h.get(file, nil) if response.message == “OK” @body\_content = resp…

---

## [Regex problem, probably simple](https://www.ruby-forum.com/t/regex-problem-probably-simple/104150)

<div class="topic-metadata">

**Author:** [@bigjimmyk3](https://www.ruby-forum.com/u/bigjimmyk3)\
**Replies:** 6\
**Last updated:** [May 17, 2007, 1:41am UTC](https://www.ruby-forum.com/t/regex-problem-probably-simple/104150 "2007-05-17T01:41:36Z")

</div>

Hello! I’m trying to do the following: I want to scrape something of a webpage. It has a massive content and I want to find the thing that comes after the first occourance of “a href=” after the occourance of “id=xxx…

---

## [5 Card Hand Evaluator](https://www.ruby-forum.com/t/5-card-hand-evaluator/104352)

<div class="topic-metadata">

**Author:** [@dracos](https://www.ruby-forum.com/u/dracos)\
**Replies:** 0\
**Last updated:** [May 17, 2007, 1:32am UTC](https://www.ruby-forum.com/t/5-card-hand-evaluator/104352 "2007-05-17T01:32:34Z")

</div>

I’ve just finised writing a 5 card hand evaluator (I’m avoding the ‘pkr’ word since the spam filter won’t let me post when I use that word), using the algorithm found: http://www.suffecool.net/\*/evaluator.html (\<\< rep…

---

## [Late huffman (quiz 123)](https://www.ruby-forum.com/t/late-huffman-quiz-123/225948)

<div class="topic-metadata">

**Author:** [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Replies:** 0\
**Last updated:** [May 17, 2007, 12:50am UTC](https://www.ruby-forum.com/t/late-huffman-quiz-123/225948 "2007-05-17T00:50:33Z")

</div>

So it’s rather late to post this, but I spent the time writing it, so why not? I was hoping I could get a few pointers also, on making this well… more ruby like. Perhaps more efficient, more right, etc. #huffman enc…

---

## [RMagick Setting JPEGCompression](https://www.ruby-forum.com/t/rmagick-setting-jpegcompression/104323)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [May 17, 2007, 12:01am UTC](https://www.ruby-forum.com/t/rmagick-setting-jpegcompression/104323 "2007-05-17T00:01:30Z")

</div>

I am trying to dynamically set the compression or quality of an image when displaying it. I have seen in the RMagick documentation how to set the quality only when writing the file to disk. How can I set the quality…

---

## [Production\_log\_analyzer 1.5.0 Released](https://www.ruby-forum.com/t/production-log-analyzer-1-5-0-released/104345)

<div class="topic-metadata">

**Author:** [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Replies:** 0\
**Last updated:** [May 16, 2007, 11:40pm UTC](https://www.ruby-forum.com/t/production-log-analyzer-1-5-0-released/104345 "2007-05-16T23:40:27Z")

</div>

production\_log\_analyzer version 1.5.0 has been released! http://seattlerb.rubyforge.org/production\_log\_analyzer production\_log\_analyzer provides three tools to analyze log files created by SyslogLogger. pl\_analyze fo…

---

## [Overloading sort\_by (blocks question)](https://www.ruby-forum.com/t/overloading-sort-by-blocks-question/104341)

<div class="topic-metadata">

**Author:** [@cmaj135](https://www.ruby-forum.com/u/cmaj135)\
**Replies:** 4\
**Last updated:** [May 16, 2007, 11:34pm UTC](https://www.ruby-forum.com/t/overloading-sort-by-blocks-question/104341 "2007-05-16T23:34:27Z")

</div>

Hi, all, I have subclassed Array to add some features. I am redefining sort\_by so that it does not return an Array but a Pairs (my subclass), but I cannot get the syntax for passing the blocks right. Here’s my code: …

---

## [Any JRUBY programmers out there? Problems specifying RUBYLIB](https://www.ruby-forum.com/t/any-jruby-programmers-out-there-problems-specifying-rubylib/103914)

<div class="topic-metadata">

**Author:** [@ronaldfischer](https://www.ruby-forum.com/u/ronaldfischer)\
**Replies:** 4\
**Last updated:** [May 16, 2007, 11:34pm UTC](https://www.ruby-forum.com/t/any-jruby-programmers-out-there-problems-specifying-rubylib/103914 "2007-05-16T23:34:20Z")

</div>

I would like to run jruby on either pure Windows, or Cygwin. This works fine as long as I only use the standard library which comes with jruby. I can’t make it, however, search additional libraries I have put in non-…

---

## [Self.included question](https://www.ruby-forum.com/t/self-included-question/104337)

<div class="topic-metadata">

**Author:** [@daveh](https://www.ruby-forum.com/u/daveh)\
**Replies:** 7\
**Last updated:** [May 16, 2007, 11:06pm UTC](https://www.ruby-forum.com/t/self-included-question/104337 "2007-05-16T23:06:24Z")

</div>

Hi there, I see the following code chunk in a lot of Rails plugins: def self.included(base) base.extend(ClassMethods) end module ClassMethods def method\_one end def method\_two end end I’m most curious about “…

---

## [Ruby distribution woes - bz2 lib and mongrel](https://www.ruby-forum.com/t/ruby-distribution-woes-bz2-lib-and-mongrel/104185)

<div class="topic-metadata">

**Author:** [@stian](https://www.ruby-forum.com/u/stian)\
**Replies:** 9\
**Last updated:** [May 16, 2007, 9:53pm UTC](https://www.ruby-forum.com/t/ruby-distribution-woes-bz2-lib-and-mongrel/104185 "2007-05-16T21:53:14Z")

</div>

Hi everyone, sometimes it really frustrates me that it’s so difficult to distribute applications written with Ruby. You hack together something quickly that works perfectly on your own machine, with all the gems, libr…

---

## [Binary String to Integer?](https://www.ruby-forum.com/t/binary-string-to-integer/104329)

<div class="topic-metadata">

**Author:** [@dracos](https://www.ruby-forum.com/u/dracos)\
**Replies:** 1\
**Last updated:** [May 16, 2007, 8:19pm UTC](https://www.ruby-forum.com/t/binary-string-to-integer/104329 "2007-05-16T20:19:12Z")

</div>

How can you translate a binary string into an integer? i.e. two = ‘10’ string\_to\_int(two) =\> 2

---

## [Problem reconnecting an ssl client, the ssl ruby daemon hang](https://www.ruby-forum.com/t/problem-reconnecting-an-ssl-client-the-ssl-ruby-daemon-hang/104318)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [May 16, 2007, 7:22pm UTC](https://www.ruby-forum.com/t/problem-reconnecting-an-ssl-client-the-ssl-ruby-daemon-hang/104318 "2007-05-16T19:22:57Z")

</div>

Hi, I have an Lua SSL client. The first time it connects, all is fine. But then, I kill the client. Reconnect it. After a few commands, when more datas are sent: /usr/lib/ruby/1.8/openssl/buffering.rb:178: warning: e…

---

## [Why doesn't a renamed file adhere to an original variable?](https://www.ruby-forum.com/t/why-doesnt-a-renamed-file-adhere-to-an-original-variable/104304)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 4\
**Last updated:** [May 16, 2007, 7:19pm UTC](https://www.ruby-forum.com/t/why-doesnt-a-renamed-file-adhere-to-an-original-variable/104304 "2007-05-16T19:19:57Z")

</div>

I need to send some graphics file over to UNIX land, but, without an extension. So, I rename the files and try to send them, and, Ruby complains that the file isn’t there. Why is it that a file rename doesn’t continue…

---

## [A problem with a cgi](https://www.ruby-forum.com/t/a-problem-with-a-cgi/104286)

<div class="topic-metadata">

**Author:** [@music](https://www.ruby-forum.com/u/music)\
**Replies:** 1\
**Last updated:** [May 16, 2007, 6:22pm UTC](https://www.ruby-forum.com/t/a-problem-with-a-cgi/104286 "2007-05-16T18:22:52Z")

</div>

Hello. I’m trying to know how to use cgi with ruby. I have write this file to connect to a ldap server and to insert data: proxy1LDAP.rb require ‘ldap’ class Proxy1LDAP def initialize @base = “ou=People,dc=mydomai…

---

## [Coexistency Problem: cygwin + Ruby for Window (and suggestio](https://www.ruby-forum.com/t/coexistency-problem-cygwin-ruby-for-window-and-suggestio/104227)

<div class="topic-metadata">

**Author:** [@ronaldfischer](https://www.ruby-forum.com/u/ronaldfischer)\
**Replies:** 6\
**Last updated:** [May 16, 2007, 4:32pm UTC](https://www.ruby-forum.com/t/coexistency-problem-cygwin-ruby-for-window-and-suggestio/104227 "2007-05-16T16:32:37Z")

</div>

I just would like to point out a problem when installing Ruby for Windows and Cygwin on the same system: The installer of the Windows version of Ruby creates - at least on systems using a keyboard with European layo…

---

## [Installation problem with RMagick-1.14.1\_IM-6.3.0-7-Q8](https://www.ruby-forum.com/t/installation-problem-with-rmagick-1-14-1-im-6-3-0-7-q8/104295)

<div class="topic-metadata">

**Author:** [@veeraa2003](https://www.ruby-forum.com/u/veeraa2003)\
**Replies:** 0\
**Last updated:** [May 16, 2007, 3:51pm UTC](https://www.ruby-forum.com/t/installation-problem-with-rmagick-1-14-1-im-6-3-0-7-q8/104295 "2007-05-16T15:51:48Z")

</div>

Hello everybody, I tried to install RMagick-1.14.1\_IM-6.3.0-7-Q8 in my windowsxp system. C:\>ruby -v ruby 1.8.6 (2007-03-13 patchlevel 0) \[i386-mswin32\] C:\>gem -v 0.9.2 C:\>rails -v Rails 1.2.3 For that I download …

---

## [Huffman Encoder (#123)](https://www.ruby-forum.com/t/huffman-encoder-123/103904)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 18\
**Last updated:** [May 16, 2007, 3:41pm UTC](https://www.ruby-forum.com/t/huffman-encoder-123/103904 "2007-05-16T15:41:33Z")

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

---

## [DRb connection error with more than 250+ DRb services](https://www.ruby-forum.com/t/drb-connection-error-with-more-than-250-drb-services/103887)

<div class="topic-metadata">

**Author:** [@JSWook](https://www.ruby-forum.com/u/JSWook)\
**Replies:** 22\
**Last updated:** [May 16, 2007, 1:20pm UTC](https://www.ruby-forum.com/t/drb-connection-error-with-more-than-250-drb-services/103887 "2007-05-16T13:20:06Z")

</div>

Simple test codes are here: class TestServer include DRb::DRbUndumped def initialize @obj = Array.new end def register(addr) @obj \<\< addr end def sum s = 0 @obj.each do |t| v = DRbObject.new\_with\_uri(t).get\_v…

---

## [Defending Ruby's OOP](https://www.ruby-forum.com/t/defending-rubys-oop/103841)

<div class="topic-metadata">

**Author:** [@chell](https://www.ruby-forum.com/u/chell)\
**Replies:** 35\
**Last updated:** [May 16, 2007, 11:19am UTC](https://www.ruby-forum.com/t/defending-rubys-oop/103841 "2007-05-16T11:19:42Z")

</div>

Hi, I’ve got someone here saying that Ruby (and other languages) can’t be 100% object-oriented because if and unless and so on (keywords) are no objects. How can I defend the claim that Ruby is 100% OOP?

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

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