# Ruby

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

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

---

## [Re: Running multiple closures per iteration](https://www.ruby-forum.com/t/re-running-multiple-closures-per-iteration/111250)

<div class="topic-metadata">

**Author:** [@dohzya](https://www.ruby-forum.com/u/dohzya)\
**Replies:** 0\
**Last updated:** [August 4, 2007, 11:53am UTC](https://www.ruby-forum.com/t/re-running-multiple-closures-per-iteration/111250 "2007-08-04T11:53:04Z")

</div>

Le samedi 04 août 2007 à 02:38 +0900, Joshua C. a écrit : o = a.select {|x| x \>= 0} p = a.inject(0) {|s, x| s += x} def truc( a, sel, &inj ) o = a.select sel.call p = a.inject(0) &inj end truc( a, proc{|x| x \>= …

---

## [Parsing C header files](https://www.ruby-forum.com/t/parsing-c-header-files/111146)

<div class="topic-metadata">

**Author:** [@wayne](https://www.ruby-forum.com/u/wayne)\
**Replies:** 1\
**Last updated:** [August 4, 2007, 10:13am UTC](https://www.ruby-forum.com/t/parsing-c-header-files/111146 "2007-08-04T10:13:56Z")

</div>

I was wondering if there is a tool that can parse a C header file and give me an AST that would allow me to process it in Ruby. Does anyone know of a relatively easy way to do this? I was thinking that a lot of peop…

---

## [Changing Gmail settings](https://www.ruby-forum.com/t/changing-gmail-settings/111238)

<div class="topic-metadata">

**Author:** [@Rigger\_Bone\_S](https://www.ruby-forum.com/u/Rigger_Bone_S)\
**Replies:** 0\
**Last updated:** [August 4, 2007, 4:54am UTC](https://www.ruby-forum.com/t/changing-gmail-settings/111238 "2007-08-04T04:54:38Z")

</div>

My Gmail account shows 50 conversations per page. I’m unable to change this setting to 25 through the gmailer-0.1.7 library. And this is three times weird: irb(main):004:0\> require ‘gmailer’ =\> true irb(main):005:0\>…

---

## [Changing indentation for case in Emacs (ruby.el)](https://www.ruby-forum.com/t/changing-indentation-for-case-in-emacs-ruby-el/111234)

<div class="topic-metadata">

**Author:** [@will\_p](https://www.ruby-forum.com/u/will_p)\
**Replies:** 0\
**Last updated:** [August 4, 2007, 2:43am UTC](https://www.ruby-forum.com/t/changing-indentation-for-case-in-emacs-ruby-el/111234 "2007-08-04T02:43:28Z")

</div>

Using Emacs to edit ruby files, I’d like to have case expresssions indented thus: case x when p then s when q then t end rather than: case x when p then s when q then t end Can I do this easily? (PS: The 1st…

---

## [HighLine and Readline](https://www.ruby-forum.com/t/highline-and-readline/111226)

<div class="topic-metadata">

**Author:** [@Ari\_B](https://www.ruby-forum.com/u/Ari_B)\
**Replies:** 2\
**Last updated:** [August 4, 2007, 1:20am UTC](https://www.ruby-forum.com/t/highline-and-readline/111226 "2007-08-04T01:20:24Z")

</div>

Hey, Good news: In my quest for buffer a user’s input serverside, I have found an answer (which is rather easy). Oh, and I got HighLine working over sockets. I need to use HighLine::Question with the Readline attrib…

---

## [Binding - how to explain it?](https://www.ruby-forum.com/t/binding-how-to-explain-it/111111)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 13\
**Last updated:** [August 4, 2007, 12:47am UTC](https://www.ruby-forum.com/t/binding-how-to-explain-it/111111 "2007-08-04T00:47:21Z")

</div>

There was a thread here recently about this idiom in Rails: eval(IO.read(file), binding, file) I changed it to a method: def eval\_file\_with\_binding(file) eval(IO.read(file), binding, file) end It appeared twice in …

---

## [Cleaner way?](https://www.ruby-forum.com/t/cleaner-way/111142)

<div class="topic-metadata">

**Author:** [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Replies:** 4\
**Last updated:** [August 4, 2007, 12:41am UTC](https://www.ruby-forum.com/t/cleaner-way/111142 "2007-08-04T00:41:21Z")

</div>

I’ll first admit this is a lot cleaner and more succinct than my first pass of it… but well Is there a way to make this case and send block clearer and cleaner? Thanks, Kyle def getProperties(type=:textField) logWa…

---

## [How to find out the number of pattern matched?](https://www.ruby-forum.com/t/how-to-find-out-the-number-of-pattern-matched/111208)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 2\
**Last updated:** [August 3, 2007, 11:34pm UTC](https://www.ruby-forum.com/t/how-to-find-out-the-number-of-pattern-matched/111208 "2007-08-03T23:34:26Z")

</div>

Hi all, I search a pattern in a string. How do I know how many times the pattern is found/matched? Thanks, Li

---

## [Encoding](https://www.ruby-forum.com/t/encoding/111214)

<div class="topic-metadata">

**Author:** [@flnative](https://www.ruby-forum.com/u/flnative)\
**Replies:** 1\
**Last updated:** [August 3, 2007, 10:40pm UTC](https://www.ruby-forum.com/t/encoding/111214 "2007-08-03T22:40:05Z")

</div>

How can I encode a text with the characters or ö in readable text? The method unescapeHTML doesn’t solve this problem. thanks for your answer…

---

## [Typos in eigenclass - Changes in Ruby 1.9](https://www.ruby-forum.com/t/typos-in-eigenclass-changes-in-ruby-1-9/111219)

<div class="topic-metadata">

**Author:** [@wonado](https://www.ruby-forum.com/u/wonado)\
**Replies:** 0\
**Last updated:** [August 3, 2007, 10:23pm UTC](https://www.ruby-forum.com/t/typos-in-eigenclass-changes-in-ruby-1-9/111219 "2007-08-03T22:23:03Z")

</div>

Moin, moin! I didn’t find a way to post this in http://eigenclass.org, so I put it here. In eigenclass.org (Enumerable#count) the following code was listed: def count(\*a) inject(0) do |c, e| unless a.size == 1 …

---

## [Getting the 'Sender' or 'Caller' object of a method](https://www.ruby-forum.com/t/getting-the-sender-or-caller-object-of-a-method/111174)

<div class="topic-metadata">

**Author:** [@jazcyk](https://www.ruby-forum.com/u/jazcyk)\
**Replies:** 11\
**Last updated:** [August 3, 2007, 9:35pm UTC](https://www.ruby-forum.com/t/getting-the-sender-or-caller-object-of-a-method/111174 "2007-08-03T21:35:57Z")

</div>

Hi, I am not having much luck in finding out how to get the calling object of a method. Is there an implicit way that a method can get a pointer to the object that called it, or do I have to write that explicitly, ma…

---

## [Beginner with a question](https://www.ruby-forum.com/t/beginner-with-a-question/111193)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 6\
**Last updated:** [August 3, 2007, 8:27pm UTC](https://www.ruby-forum.com/t/beginner-with-a-question/111193 "2007-08-03T20:27:49Z")

</div>

So I am new to ruby, and I seem to be stuck on a seemingly simple problem. I have two variable’s, one that is defined in the script, and one that is grabbed from input. I can add them together just fine, but I have no…

---

## [Keylogging in Ruby](https://www.ruby-forum.com/t/keylogging-in-ruby/111198)

<div class="topic-metadata">

**Author:** [@Ari\_B](https://www.ruby-forum.com/u/Ari_B)\
**Replies:** 0\
**Last updated:** [August 3, 2007, 7:30pm UTC](https://www.ruby-forum.com/t/keylogging-in-ruby/111198 "2007-08-03T19:30:39Z")

</div>

Keylogging in Ruby I’ve been attempting (feebly) to build a nice Telnet server recently. One of my (many) difficult tasks is retrieving characters from the other side of the 'net with the client hitting enter. ie… p…

---

## [Can I intercept "instance variable XYZ not initialized"](https://www.ruby-forum.com/t/can-i-intercept-instance-variable-xyz-not-initialized/111192)

<div class="topic-metadata">

**Author:** [@lfast](https://www.ruby-forum.com/u/lfast)\
**Replies:** 0\
**Last updated:** [August 3, 2007, 6:36pm UTC](https://www.ruby-forum.com/t/can-i-intercept-instance-variable-xyz-not-initialized/111192 "2007-08-03T18:36:03Z")

</div>

I’m working with Test::Unit and want to reduce the amount of noise in the results. One annoying problem with negative test cases is “warning: instance variable XYZ not initialized” I may simply be doing things wrong b…

---

## [ModRuby Init Handler](https://www.ruby-forum.com/t/modruby-init-handler/111190)

<div class="topic-metadata">

**Author:** [@avanetix](https://www.ruby-forum.com/u/avanetix)\
**Replies:** 0\
**Last updated:** [August 3, 2007, 6:11pm UTC](https://www.ruby-forum.com/t/modruby-init-handler/111190 "2007-08-03T18:11:29Z")

</div>

Hello, Apache 2.2.4 Ruby 1.8.6 mod\_ruby 1.2.6 I try to use RubyInitHandler: ========================= .htaccess RubyRequire myhandlers.rb \<Files \*.html\> SetHandler ruby-object RubyInitHandler MyInitHandler.insta…

---

## [Updating header in file](https://www.ruby-forum.com/t/updating-header-in-file/111147)

<div class="topic-metadata">

**Author:** [@rorjeff](https://www.ruby-forum.com/u/rorjeff)\
**Replies:** 4\
**Last updated:** [August 3, 2007, 5:18pm UTC](https://www.ruby-forum.com/t/updating-header-in-file/111147 "2007-08-03T17:18:24Z")

</div>

Let me try this in another way. I have a file (test.txt) where each line contains comma separated values and I am using CSV to work though that stored file. The first line of the file is a header used by the CSV pr…

---

## [Re: public key encrypt](https://www.ruby-forum.com/t/re-public-key-encrypt/111172)

<div class="topic-metadata">

**Author:** [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Replies:** 2\
**Last updated:** [August 3, 2007, 3:33pm UTC](https://www.ruby-forum.com/t/re-public-key-encrypt/111172 "2007-08-03T15:33:12Z")

</div>

I know how to use public key to encrypt data if I create public/private key pair by myself through OpenSSL::PKey::RSA. However, if I only know other guy’s public key, how could I encrypt data with his/her public key?…

---

## [Pushing Find.find output into an array](https://www.ruby-forum.com/t/pushing-find-find-output-into-an-array/111144)

<div class="topic-metadata">

**Author:** [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Replies:** 2\
**Last updated:** [August 3, 2007, 2:02pm UTC](https://www.ruby-forum.com/t/pushing-find-find-output-into-an-array/111144 "2007-08-03T14:02:58Z")

</div>

Im basically wanted to throw the output from a find into an array require ‘find’ Dir.chdir(’/’) Find.find("/", “./”) {|x| puts x} —\> need to push the results into an array with each item being a different element. …

---

## [Windows Authentication](https://www.ruby-forum.com/t/windows-authentication/111167)

<div class="topic-metadata">

**Author:** [@hustler](https://www.ruby-forum.com/u/hustler)\
**Replies:** 2\
**Last updated:** [August 3, 2007, 1:52pm UTC](https://www.ruby-forum.com/t/windows-authentication/111167 "2007-08-03T13:52:07Z")

</div>

I have developed a ruby application that runs on Linux. The application has to extract information from a web service which is located on an IIS that has enabled integrated windows authentication. Does anyone have any…

---

## [Sybase and ruby](https://www.ruby-forum.com/t/sybase-and-ruby/111069)

<div class="topic-metadata">

**Author:** [@vabb\_z](https://www.ruby-forum.com/u/vabb_z)\
**Replies:** 4\
**Last updated:** [August 3, 2007, 12:43pm UTC](https://www.ruby-forum.com/t/sybase-and-ruby/111069 "2007-08-03T12:43:16Z")

</div>

I am trying to configure Sybase and ruby in LINUX but not able to do that. Is it necessary to install Sybase Client on PC ?

---

## [Erubis+Apache?](https://www.ruby-forum.com/t/erubis-apache/111164)

<div class="topic-metadata">

**Author:** [@quik77](https://www.ruby-forum.com/u/quik77)\
**Replies:** 0\
**Last updated:** [August 3, 2007, 11:53am UTC](https://www.ruby-forum.com/t/erubis-apache/111164 "2007-08-03T11:53:30Z")

</div>

Say I want to register a new document type in Apache .erubis which contains erubis “data”, and i want to serve this content, i.e. similar to .cgi (but processed via Erubis::Eruby.new() How to do this? All I seem to …

---

## [Hostblock (PAM module for blocking ssh failed attemts)](https://www.ruby-forum.com/t/hostblock-pam-module-for-blocking-ssh-failed-attemts/111163)

<div class="topic-metadata">

**Author:** [@prhlava](https://www.ruby-forum.com/u/prhlava)\
**Replies:** 0\
**Last updated:** [August 3, 2007, 11:16am UTC](https://www.ruby-forum.com/t/hostblock-pam-module-for-blocking-ssh-failed-attemts/111163 "2007-08-03T11:16:37Z")

</div>

Hi! Hostblock is a PAM module (tested under Debian Sarge and Etch) for blocking repeatedly failed login attempts over ssh. It comes in two version (sqlite3 and postgresql) depending where the data are stored. I have …

---

## [WSSE Headers in Net::HTTP](https://www.ruby-forum.com/t/wsse-headers-in-net-http/111117)

<div class="topic-metadata">

**Author:** [@michaelb](https://www.ruby-forum.com/u/michaelb)\
**Replies:** 1\
**Last updated:** [August 3, 2007, 10:52am UTC](https://www.ruby-forum.com/t/wsse-headers-in-net-http/111117 "2007-08-03T10:52:28Z")

</div>

Hello all! I am creating an API library for Pownce in Ruby. It’s hard because there is no documentation whatsoever, only the hard work done by those working on Python and ColdFusion versions. It is a pretty long file,…

---

## [\# unsubscribe](https://www.ruby-forum.com/t/unsubscribe/111160)

<div class="topic-metadata">

**Author:** [@Vermeer\_GRANGE](https://www.ruby-forum.com/u/Vermeer_GRANGE)\
**Replies:** 0\
**Last updated:** [August 3, 2007, 10:15am UTC](https://www.ruby-forum.com/t/unsubscribe/111160 "2007-08-03T10:15:25Z")

</div>

unsubscribe

---

## [\# unsubscribe](https://www.ruby-forum.com/t/unsubscribe/111157)

<div class="topic-metadata">

**Author:** [@Natalia\_Pares\_Vives](https://www.ruby-forum.com/u/Natalia_Pares_Vives)\
**Replies:** 0\
**Last updated:** [August 3, 2007, 9:45am UTC](https://www.ruby-forum.com/t/unsubscribe/111157 "2007-08-03T09:45:23Z")

</div>

unsubscribe

---

## [Question about low-level ruby](https://www.ruby-forum.com/t/question-about-low-level-ruby/111154)

<div class="topic-metadata">

**Author:** [@liwenqiu](https://www.ruby-forum.com/u/liwenqiu)\
**Replies:** 1\
**Last updated:** [August 3, 2007, 9:25am UTC](https://www.ruby-forum.com/t/question-about-low-level-ruby/111154 "2007-08-03T09:25:22Z")

</div>

Hi ~ What is Top-Level Execution Enironment? What is Object and Kernel, and then how to working together? When i run a ruby code, define method, call puts output something, what happen? i need Low-Level document …

---

## [\[ANN\] Ruby-VPI 18.0.1](https://www.ruby-forum.com/t/ann-ruby-vpi-18-0-1/111152)

<div class="topic-metadata">

**Author:** [@snk](https://www.ruby-forum.com/u/snk)\
**Replies:** 0\
**Last updated:** [August 3, 2007, 8:26am UTC](https://www.ruby-forum.com/t/ann-ruby-vpi-18-0-1/111152 "2007-08-03T08:26:48Z")

</div>

Ruby-VPI is a Ruby interface to IEEE 1364-2005 Verilog VPI and a platform for unit testing, rapid prototyping, and systems integration of Verilog modules through Ruby. It lets you create complex Verilog test benches e…

---

## [Public key encrypt](https://www.ruby-forum.com/t/public-key-encrypt/110868)

<div class="topic-metadata">

**Author:** [@rubyer](https://www.ruby-forum.com/u/rubyer)\
**Replies:** 2\
**Last updated:** [August 3, 2007, 6:20am UTC](https://www.ruby-forum.com/t/public-key-encrypt/110868 "2007-08-03T06:20:57Z")

</div>

Hello all, I know how to use public key to encrypt data if I create public/private key pair by myself through OpenSSL::PKey::RSA. However, if I only know other guy’s public key, how could I encrypt data with his/her p…

---

## [Ordered hashes/ yaml?](https://www.ruby-forum.com/t/ordered-hashes-yaml/111053)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 9\
**Last updated:** [August 3, 2007, 5:58am UTC](https://www.ruby-forum.com/t/ordered-hashes-yaml/111053 "2007-08-03T05:58:55Z")

</div>

hi - i understand hashes dont keep their order in ruby, so wondering what the most elegant way to create some YAML that i want to maintain order is… for a simple menu system, i have a YAML file currently as: section1…

---

## [\# unsubscribe](https://www.ruby-forum.com/t/unsubscribe/111148)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [August 3, 2007, 5:42am UTC](https://www.ruby-forum.com/t/unsubscribe/111148 "2007-08-03T05:42:55Z")

</div>

unsubscribe \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_Ready for the edge of your seat? Check out tonight’s top picks on Yahoo! TV.

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

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