# Ruby

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

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

---

## [Awk to ruby 1.9](https://www.ruby-forum.com/t/awk-to-ruby-1-9/179828)

<div class="topic-metadata">

**Author:** [@atma](https://www.ruby-forum.com/u/atma)\
**Replies:** 11\
**Last updated:** [December 7, 2009, 6:28pm UTC](https://www.ruby-forum.com/t/awk-to-ruby-1-9/179828 "2009-12-07T18:28:58Z")

</div>

Hello, I’m a total newbe. I’m trying to figure out how to grab a specific Xth character from a .log and put it into an array. So far, I’ve got to this code snippet: encoding: utf-8 class ReadIPs def initialize @r…

---

## [Mail: modifing a body](https://www.ruby-forum.com/t/mail-modifing-a-body/179898)

<div class="topic-metadata">

**Author:** [@rabarama](https://www.ruby-forum.com/u/rabarama)\
**Replies:** 0\
**Last updated:** [December 7, 2009, 5:41pm UTC](https://www.ruby-forum.com/t/mail-modifing-a-body/179898 "2009-12-07T17:41:33Z")

</div>

I’ve a multipart mail, i parse it creating a Tmail object. In the body i have “—start—” “—end—” marks that indicates a part of the text to delete. If i read the email and then deliver it without touching the body, it …

---

## [Qed 1.2](https://www.ruby-forum.com/t/qed-1-2/179899)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 0\
**Last updated:** [December 7, 2009, 5:37pm UTC](https://www.ruby-forum.com/t/qed-1-2/179899 "2009-12-07T17:37:27Z")

</div>

QED is a test/documentation framework. It allows you to define “demonstrations” that run like tests and document like markup. This release adds comment matchers similar to Cucumber. Use #When to define these. These ar…

---

## [\[ANN\] jruby-openssl 0.6 - Recommended Upgrade](https://www.ruby-forum.com/t/ann-jruby-openssl-0-6-recommended-upgrade/179892)

<div class="topic-metadata">

**Author:** [@nicksnels](https://www.ruby-forum.com/u/nicksnels)\
**Replies:** 0\
**Last updated:** [December 7, 2009, 3:40pm UTC](https://www.ruby-forum.com/t/ann-jruby-openssl-0-6-recommended-upgrade/179892 "2009-12-07T15:40:24Z")

</div>

I’ve just released jruby-openssl 0.6. jruby-openssl is an add-on gem that implements Ruby’s OpenSSL extension for JRuby. PLEASE NOTE: this is a recommended upgrade. A security vulnerability was discovered in jruby-ope…

---

## [Jruby-openssl 0.6 - Recommended Upgrade](https://www.ruby-forum.com/t/jruby-openssl-0-6-recommended-upgrade/179894)

<div class="topic-metadata">

**Author:** [@nicksnels](https://www.ruby-forum.com/u/nicksnels)\
**Replies:** 0\
**Last updated:** [December 7, 2009, 3:40pm UTC](https://www.ruby-forum.com/t/jruby-openssl-0-6-recommended-upgrade/179894 "2009-12-07T15:40:24Z")

</div>

I’ve just released jruby-openssl 0.6. jruby-openssl is an add-on gem that implements Ruby’s OpenSSL extension for JRuby. PLEASE NOTE: this is a recommended upgrade. A security vulnerability was discovered in jruby-ope…

---

## [A novice's question about load](https://www.ruby-forum.com/t/a-novices-question-about-load/179885)

<div class="topic-metadata">

**Author:** [@shiki](https://www.ruby-forum.com/u/shiki)\
**Replies:** 4\
**Last updated:** [December 7, 2009, 2:10pm UTC](https://www.ruby-forum.com/t/a-novices-question-about-load/179885 "2009-12-07T14:10:24Z")

</div>

Hello All I have two source files in the same directory: a.rb and b.rb The content of a.rb is as follow: puts “Hello form a.rb” and b.rb is load ‘a’ puts “Hello from b.rb” load ‘a’ puts ‘Hello again from b.rb’ W…

---

## [Rails 2.3.5, tomcat Ok, jetty strange error](https://www.ruby-forum.com/t/rails-2-3-5-tomcat-ok-jetty-strange-error/179890)

<div class="topic-metadata">

**Author:** [@Reto\_SchSSS\_ttel](https://www.ruby-forum.com/u/Reto_SchSSS_ttel)\
**Replies:** 0\
**Last updated:** [December 7, 2009, 1:50pm UTC](https://www.ruby-forum.com/t/rails-2-3-5-tomcat-ok-jetty-strange-error/179890 "2009-12-07T13:50:22Z")

</div>

Hi I’ve setup a basic rails app using the JRoR Tutorial\[1\]. The application runs fine with jruby script/server and using Tomcat, but it produces the following error in Jetty 6.1.22: no such file to load – i18n/backe…

---

## [Find out how you can change your love life with our wonder pills](https://www.ruby-forum.com/t/find-out-how-you-can-change-your-love-life-with-our-wonder-pills/179888)

<div class="topic-metadata">

**Author:** [@cute.atiya](https://www.ruby-forum.com/u/cute.atiya)\
**Replies:** 0\
**Last updated:** [December 7, 2009, 1:05pm UTC](https://www.ruby-forum.com/t/find-out-how-you-can-change-your-love-life-with-our-wonder-pills/179888 "2009-12-07T13:05:54Z")

</div>

Try it once and your carnal victories will follow one after another! Give her the best time.Natural boosting supplement! High arousal drive potion! http://www.ambrina.com/

---

## [Unicorn 0.95.2 - small HTTP parser fixes](https://www.ruby-forum.com/t/unicorn-0-95-2-small-http-parser-fixes/179889)

<div class="topic-metadata">

**Author:** [@ericw](https://www.ruby-forum.com/u/ericw)\
**Replies:** 0\
**Last updated:** [December 7, 2009, 11:32am UTC](https://www.ruby-forum.com/t/unicorn-0-95-2-small-http-parser-fixes/179889 "2009-12-07T11:32:16Z")

</div>

Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels. Slow clients should only be ser…

---

## [Ruby 1.9 and collect](https://www.ruby-forum.com/t/ruby-1-9-and-collect/179861)

<div class="topic-metadata">

**Author:** [@idiosyncratici](https://www.ruby-forum.com/u/idiosyncratici)\
**Replies:** 12\
**Last updated:** [December 7, 2009, 11:16am UTC](https://www.ruby-forum.com/t/ruby-1-9-and-collect/179861 "2009-12-07T11:16:28Z")

</div>

Under ruby 1.8.6, running \[1, 2, 3\].collect results in an array of \[1, 2, 3\]. In 1.9, however, running \[1, 2, 3\].collect results in an Enumerator, which I then have to call .to\_a on. Alternately, I can supply a blo…

---

## [AUTO: Joe Grastara is out of the office (returning 12/14/2009)](https://www.ruby-forum.com/t/auto-joe-grastara-is-out-of-the-office-returning-12-14-2009/179887)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [December 7, 2009, 10:16am UTC](https://www.ruby-forum.com/t/auto-joe-grastara-is-out-of-the-office-returning-12-14-2009/179887 "2009-12-07T10:16:12Z")

</div>

I am out of the office until 12/14/2009. Please send mail to removed\_email\_address@domain.invalid in my absence. Note: This is an automated response to your message “A novice’s question about load” sent on 12/7/2009…

---

## [Closures](https://www.ruby-forum.com/t/closures/179558)

<div class="topic-metadata">

**Author:** [@Burlsm](https://www.ruby-forum.com/u/Burlsm)\
**Replies:** 4\
**Last updated:** [December 7, 2009, 10:14am UTC](https://www.ruby-forum.com/t/closures/179558 "2009-12-07T10:14:26Z")

</div>

hi i’m having a little trouble with closures and i’d like to know what the equivalent code for the canonical make-adder procedure would in ruby, in scheme it would be like (define (make-adder n) (lambda (x) (+ x n)…

---

## [Why doesn't Ruby "compile" strings?](https://www.ruby-forum.com/t/why-doesnt-ruby-compile-strings/179866)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 11\
**Last updated:** [December 6, 2009, 4:17pm UTC](https://www.ruby-forum.com/t/why-doesnt-ruby-compile-strings/179866 "2009-12-06T16:17:05Z")

</div>

Hi, the following code: #!/usr/bin/ruby require “benchmark” HELLO\_WORLD = “hello world” 1.upto(4) do print "Benchmark using HELLO\_WORLD: " puts Benchmark.realtime { 1.upto(500000) {|i| HELLO\_WORLD.upcase } } pr…

---

## [Rsruby gem](https://www.ruby-forum.com/t/rsruby-gem/179845)

<div class="topic-metadata">

**Author:** [@timr](https://www.ruby-forum.com/u/timr)\
**Replies:** 3\
**Last updated:** [December 6, 2009, 2:17pm UTC](https://www.ruby-forum.com/t/rsruby-gem/179845 "2009-12-06T14:17:36Z")

</div>

Does anybody have rsruby gem running on snow leopard? to get rsruby working, you need to install R with --enable-R-shlib. So you need to install from source. When I try that I find that mac os x cannot compile fortran…

---

## [Send Unlimited Free sms World Wide](https://www.ruby-forum.com/t/send-unlimited-free-sms-world-wide/197114)

<div class="topic-metadata">

**Author:** [@one4time](https://www.ruby-forum.com/u/one4time)\
**Replies:** 0\
**Last updated:** [December 6, 2009, 2:11pm UTC](https://www.ruby-forum.com/t/send-unlimited-free-sms-world-wide/197114 "2009-12-06T14:11:09Z")

</div>

http://www.smsvoip.co.cc

---

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

<div class="topic-metadata">

**Author:** [@wannab78](https://www.ruby-forum.com/u/wannab78)\
**Replies:** 0\
**Last updated:** [December 6, 2009, 2:07pm UTC](https://www.ruby-forum.com/t/unsubscribe/179876 "2009-12-06T14:07:38Z")

</div>

unsubscribe New Email names for you! Get the Email name you've always wanted on the new @ymail and @rocketmail. Hurry before someone else does! http://mail.promotions.yahoo.com/newdomains/sg/

---

## [CSV confusion newbie question](https://www.ruby-forum.com/t/csv-confusion-newbie-question/179865)

<div class="topic-metadata">

**Author:** [@roa](https://www.ruby-forum.com/u/roa)\
**Replies:** 1\
**Last updated:** [December 6, 2009, 2:36am UTC](https://www.ruby-forum.com/t/csv-confusion-newbie-question/179865 "2009-12-06T02:36:09Z")

</div>

I am confused on why my two Ruby scripts using CSV behave differently. I hope someone can explain why it works this way and how to get consistent results. My first attempt worked; I parsed a CSV file with double-quote…

---

## [Best way to distribute an app](https://www.ruby-forum.com/t/best-way-to-distribute-an-app/179571)

<div class="topic-metadata">

**Author:** [@tutiplain](https://www.ruby-forum.com/u/tutiplain)\
**Replies:** 15\
**Last updated:** [December 6, 2009, 12:55am UTC](https://www.ruby-forum.com/t/best-way-to-distribute-an-app/179571 "2009-12-06T00:55:48Z")

</div>

Hello everyone, I am still sort of new to all things Ruby, but I am quickly learning all about the language’s capabilities. I program mostly in Windows. One thing I’ve noticed, it’s that, for a serious application, y…

---

## [Different output for same expression?](https://www.ruby-forum.com/t/different-output-for-same-expression/179859)

<div class="topic-metadata">

**Author:** [@steven290](https://www.ruby-forum.com/u/steven290)\
**Replies:** 3\
**Last updated:** [December 5, 2009, 11:13pm UTC](https://www.ruby-forum.com/t/different-output-for-same-expression/179859 "2009-12-05T23:13:24Z")

</div>

Forgive me if this is an elementary question and I am missing something obvious, but there is a behavior in Ruby that puzzles me a lot. I don’t see why the two blocks below do not produce the same output. One displays…

---

## [Amp](https://www.ruby-forum.com/t/amp/179862)

<div class="topic-metadata">

**Author:** [@ryan](https://www.ruby-forum.com/u/ryan)\
**Replies:** 1\
**Last updated:** [December 5, 2009, 10:55pm UTC](https://www.ruby-forum.com/t/amp/179862 "2009-12-05T22:55:51Z")

</div>

I just saw the amp http://amp.carboni.ca/ project on GitHubhttp://github.com/michaeledgar/ampand thought that someone might be able to help get amp running on Windows. It appears they really only need help with file p…

---

## [Wxruby and rubymsn](https://www.ruby-forum.com/t/wxruby-and-rubymsn/179858)

<div class="topic-metadata">

**Author:** [@thomask](https://www.ruby-forum.com/u/thomask)\
**Replies:** 2\
**Last updated:** [December 5, 2009, 8:05pm UTC](https://www.ruby-forum.com/t/wxruby-and-rubymsn/179858 "2009-12-05T20:05:41Z")

</div>

Hello I’m currently playing with wxRuby and RubyMSN to learn to program desktop-programs. I know it is a hard task instead of just crating a notepad etc, but I need a bigger task than a notepad. I now do manage to use…

---

## [\[ANN\] call for windows ffi examples](https://www.ruby-forum.com/t/ann-call-for-windows-ffi-examples/179857)

<div class="topic-metadata">

**Author:** [@ratchetcat](https://www.ruby-forum.com/u/ratchetcat)\
**Replies:** 0\
**Last updated:** [December 5, 2009, 5:46pm UTC](https://www.ruby-forum.com/t/ann-call-for-windows-ffi-examples/179857 "2009-12-05T17:46:14Z")

</div>

You probably know that FFI enables you to use existing and custom native libraries by writing only Ruby code. You probably know that a Ruby FFI extension is multi-platform, multi-implementation and will work without c…

---

## [Gem cleanup/uninstall not dropping old executables?](https://www.ruby-forum.com/t/gem-cleanup-uninstall-not-dropping-old-executables/179856)

<div class="topic-metadata">

**Author:** [@Shot\_SPiotr\_S.S](https://www.ruby-forum.com/u/Shot_SPiotr_S.S)\
**Replies:** 0\
**Last updated:** [December 5, 2009, 4:58pm UTC](https://www.ruby-forum.com/t/gem-cleanup-uninstall-not-dropping-old-executables/179856 "2009-12-05T16:58:14Z")

</div>

Hello, dear readers of ruby-talk. Iâ€™m an avid user of gem update/gem cleanup pair, but I just noticed that gem cleanup does not drop old executables. After â€˜gem install art-decomp -v 0.0.0; gem update; gem cleanup…

---

## [Class arguments (newbe question)](https://www.ruby-forum.com/t/class-arguments-newbe-question/179852)

<div class="topic-metadata">

**Author:** [@atma](https://www.ruby-forum.com/u/atma)\
**Replies:** 2\
**Last updated:** [December 5, 2009, 11:18am UTC](https://www.ruby-forum.com/t/class-arguments-newbe-question/179852 "2009-12-05T11:18:48Z")

</div>

\-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello to the list! I have the following code which prints the ip’s from fail2ban.log and puts then in an array: class ReadIPs attr\_accessor :ip def initialize(ip) @i…

---

## [IronRuby + ActiveRecord + MySql](https://www.ruby-forum.com/t/ironruby-activerecord-mysql/179837)

<div class="topic-metadata">

**Author:** [@f1r3](https://www.ruby-forum.com/u/f1r3)\
**Replies:** 3\
**Last updated:** [December 5, 2009, 10:16am UTC](https://www.ruby-forum.com/t/ironruby-activerecord-mysql/179837 "2009-12-05T10:16:06Z")

</div>

Is there a MySql adapter available?

---

## [\[Bug #508\] lib/pp.rb:468: \[BUG\] Segmentation fault](https://www.ruby-forum.com/t/bug-508-lib-pp-rb-bug-segmentation-fault/147010)

<div class="topic-metadata">

**Author:** [@pegacorn\_jp](https://www.ruby-forum.com/u/pegacorn_jp)\
**Replies:** 2\
**Last updated:** [December 5, 2009, 9:33am UTC](https://www.ruby-forum.com/t/bug-508-lib-pp-rb-bug-segmentation-fault/147010 "2009-12-05T09:33:27Z")

</div>

Bug #508: lib/pp.rb:468: \[BUG\] Segmentation fault http://redmine.ruby-lang.org/issues/show/508 e$B5/I\<\<Te(B: pegacorn jp e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal 1.8.6-p286 e$B$G$b!"e(B\[ruby-dev:35104\]e$B$HF1$82U…

---

## [Convert an array to a hash](https://www.ruby-forum.com/t/convert-an-array-to-a-hash/179848)

<div class="topic-metadata">

**Author:** [@rubynut](https://www.ruby-forum.com/u/rubynut)\
**Replies:** 6\
**Last updated:** [December 5, 2009, 6:44am UTC](https://www.ruby-forum.com/t/convert-an-array-to-a-hash/179848 "2009-12-05T06:44:12Z")

</div>

Helo, How to convert an array to a hash? for example, x =\> \[“a”, “hello”, “b”, “world”, “c”, “welcome”, “d”, “baby”\] to: z =\> {“a”=\>“hello”, “b”=\>“world”, “c”=\>“welcome”, “d”=\>“baby”} And, for creating an arr…

---

## [Code Review: InspectAppendCompareTo](https://www.ruby-forum.com/t/code-review-inspectappendcompareto/179844)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [December 5, 2009, 4:10am UTC](https://www.ruby-forum.com/t/code-review-inspectappendcompareto/179844 "2009-12-05T04:10:25Z")

</div>

tfpt review “/shelveset:InspectAppendCompareTo;REDMOND\\tomat” Comment : Fixes handling of encoded strings in MutableString.Append, CompareTo and Inspect. Fixes http://ironruby.codeplex.com/WorkItem/View.aspx?WorkIte…

---

## [Leveraging StdLib.Win32API class](https://www.ruby-forum.com/t/leveraging-stdlib-win32api-class/179603)

<div class="topic-metadata">

**Author:** [@jameslabocki](https://www.ruby-forum.com/u/jameslabocki)\
**Replies:** 2\
**Last updated:** [December 5, 2009, 3:31am UTC](https://www.ruby-forum.com/t/leveraging-stdlib-win32api-class/179603 "2009-12-05T03:31:59Z")

</div>

Hi all, I’m working on using metasm (http://metasm.cr0.org/) with IronRuby in order to generate and ultimately execute code at runtime. At the moment, I’ve been successful in using metasm to get back a string contai…

---

## [\[Backport #1938\] FreeBSD$B$G(Bmake$B$K\<:GT$9$k(B](https://www.ruby-forum.com/t/backport-1938-freebsd-b-g-bmake-b-k-gt-9-k-b/173757)

<div class="topic-metadata">

**Author:** [@Yui\_NARUSE](https://www.ruby-forum.com/u/Yui_NARUSE)\
**Replies:** 1\
**Last updated:** [December 5, 2009, 3:01am UTC](https://www.ruby-forum.com/t/backport-1938-freebsd-b-g-bmake-b-k-gt-9-k-b/173757 "2009-12-05T03:01:21Z")

</div>

Backport #1938: FreeBSDe$B$Ge(Bmakee$B$K\<:GT$9$ke(B http://redmine.ruby-lang.org/issues/show/1938 e$B5/I\<\<Te(B: Yui NARUSE e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal common.mke$B$Ke(B$(YACC) -d $(YFLAGS) -o y.tab.c …

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

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