# Ruby

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

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

---

## [How to upcase/downcase utf-8 chars?](https://www.ruby-forum.com/t/how-to-upcase-downcase-utf-8-chars/147658)

<div class="topic-metadata">

**Author:** [@es\_S](https://www.ruby-forum.com/u/es_S)\
**Replies:** 4\
**Last updated:** [September 5, 2008, 3:08pm UTC](https://www.ruby-forum.com/t/how-to-upcase-downcase-utf-8-chars/147658 "2008-09-05T15:08:39Z")

</div>

Hi, I want to upcase/downcase utf-8 characters. How to do it with ruby? I googled the web with no satisfying results. I also installed character-encodings (0.4.1) but have no idea how to use it (the documentation is …

---

## [How to read a character at a time from STDIN without needing to press return key?](https://www.ruby-forum.com/t/how-to-read-a-character-at-a-time-from-stdin-without-needing-to-press-return-key/147643)

<div class="topic-metadata">

**Author:** [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Replies:** 5\
**Last updated:** [September 5, 2008, 3:05pm UTC](https://www.ruby-forum.com/t/how-to-read-a-character-at-a-time-from-stdin-without-needing-to-press-return-key/147643 "2008-09-05T15:05:44Z")

</div>

In the following bit of code: print STDIN.getc STDOUT.flush The code for whatever key I type isn’t actually printed out until I go on to hit the return key. How can I have it printed as soon as I type a character ke…

---

## [How do I quickly search the end of a huge text file?](https://www.ruby-forum.com/t/how-do-i-quickly-search-the-end-of-a-huge-text-file/147757)

<div class="topic-metadata">

**Author:** [@bguan](https://www.ruby-forum.com/u/bguan)\
**Replies:** 10\
**Last updated:** [September 5, 2008, 2:31pm UTC](https://www.ruby-forum.com/t/how-do-i-quickly-search-the-end-of-a-huge-text-file/147757 "2008-09-05T14:31:44Z")

</div>

I am trying to create a ruby script that will search a maya ascii file for specific text. The problem I’m running into is that it’s running to slow for the system at work. I know that all the information I need is in …

---

## [How to read digits in a number](https://www.ruby-forum.com/t/how-to-read-digits-in-a-number/147782)

<div class="topic-metadata">

**Author:** [@jsn1](https://www.ruby-forum.com/u/jsn1)\
**Replies:** 3\
**Last updated:** [September 5, 2008, 2:26pm UTC](https://www.ruby-forum.com/t/how-to-read-digits-in-a-number/147782 "2008-09-05T14:26:28Z")

</div>

Hi all I would like to read all the characters in a string. For example “123456” I need to read every digit separately. thanks

---

## [IronRuby on Mono](https://www.ruby-forum.com/t/ironruby-on-mono/147531)

<div class="topic-metadata">

**Author:** [@Wim\_Vander\_S](https://www.ruby-forum.com/u/Wim_Vander_S)\
**Replies:** 8\
**Last updated:** [September 5, 2008, 1:54pm UTC](https://www.ruby-forum.com/t/ironruby-on-mono/147531 "2008-09-05T13:54:47Z")

</div>

Hi, I was trying to build IronRuby from SVN head, but I encountered a few problems: Several times in context.rb, there are calls to String#basename and String#dirname. These should probably be replaced by File.bas…

---

## [\[Bug: 1.9\] undefined method \`readpartial' for TestFileUtils::Stream](https://www.ruby-forum.com/t/bug-1-9-undefined-method-readpartial-for-testfileutils-stream/147582)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 3\
**Last updated:** [September 5, 2008, 11:47am UTC](https://www.ruby-forum.com/t/bug-1-9-undefined-method-readpartial-for-testfileutils-stream/147582 "2008-09-05T11:47:32Z")

</div>

e$B!!$5$5$@$G$9!%e(B e$B!!e(Btest-all e$B$G0J2\<$N$h$&$J\<:GT$K$J$j$^$9!%e(B Error: test\_copy\_stream(TestFileUtils): NoMethodError: undefined method readpartial' for #\<TestFileUtils::Stream:0x0000000503ccf8\> /home/ko1…

---

## [Method chaining via symbols](https://www.ruby-forum.com/t/method-chaining-via-symbols/147776)

<div class="topic-metadata">

**Author:** [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Replies:** 2\
**Last updated:** [September 5, 2008, 11:22am UTC](https://www.ruby-forum.com/t/method-chaining-via-symbols/147776 "2008-09-05T11:22:19Z")

</div>

If this is too strange just say so. Tonight I was working with a rails helper method which accepts several symbols as arguments which get turned into method calls. Normally it’s used on activerecord objects, but I w…

---

## [Re: Need a 40 LOC (ignoring comments) to be shorter -- suggestions wanted](https://www.ruby-forum.com/t/re-need-a-40-loc-ignoring-comments-to-be-shorter-suggestions-wanted/147767)

<div class="topic-metadata">

**Author:** [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Replies:** 2\
**Last updated:** [September 5, 2008, 9:55am UTC](https://www.ruby-forum.com/t/re-need-a-40-loc-ignoring-comments-to-be-shorter-suggestions-wanted/147767 "2008-09-05T09:55:50Z")

</div>

Verbose and inefficient, but there was a 10 minute limit :slight\_smile: class Gen include Enumerable def each (3…7).each do |c1| (3…7).each do |c2| next if \[c1\].include? c2 (3…7).each do |c3| next if \[c1,c2\].includ…

---

## [About critical section](https://www.ruby-forum.com/t/about-critical-section/147765)

<div class="topic-metadata">

**Author:** [@difei](https://www.ruby-forum.com/u/difei)\
**Replies:** 2\
**Last updated:** [September 5, 2008, 9:02am UTC](https://www.ruby-forum.com/t/about-critical-section/147765 "2008-09-05T09:02:06Z")

</div>

Greetings all, I post a similar message to rails mailing list since I encountered this problem during development of a rails application, but now the problem is more ruby specific, so I decided to post here. Basicall…

---

## [FeedTools](https://www.ruby-forum.com/t/feedtools/147759)

<div class="topic-metadata">

**Author:** [@Joe\_Tremblay](https://www.ruby-forum.com/u/Joe_Tremblay)\
**Replies:** 0\
**Last updated:** [September 5, 2008, 5:47am UTC](https://www.ruby-forum.com/t/feedtools/147759 "2008-09-05T05:47:33Z")

</div>

Howdy: I’ve been trying to get a simple project going with FeedTools. While I’ve got some code working on my Ubuntu machine, trying to get it running in a hosted environment (Site5) has been a bugger. The roadblock …

---

## [Digest Authentication in Rack](https://www.ruby-forum.com/t/digest-authentication-in-rack/147758)

<div class="topic-metadata">

**Author:** [@roxah](https://www.ruby-forum.com/u/roxah)\
**Replies:** 0\
**Last updated:** [September 5, 2008, 4:38am UTC](https://www.ruby-forum.com/t/digest-authentication-in-rack/147758 "2008-09-05T04:38:42Z")

</div>

Hello all, Has anyone been able to figure out how to use the digest authentication provided in Rack? I tried searching the web and tried reading Rack’s documentation, but still haven’t had any success. The Rack::Au…

---

## [String Combine problem](https://www.ruby-forum.com/t/string-combine-problem/147692)

<div class="topic-metadata">

**Author:** [@luckyzenn](https://www.ruby-forum.com/u/luckyzenn)\
**Replies:** 3\
**Last updated:** [September 5, 2008, 3:55am UTC](https://www.ruby-forum.com/t/string-combine-problem/147692 "2008-09-05T03:55:19Z")

</div>

Hello, I have a algorithm problem and I’m trying to resolve it Here is an array s = \[“aaa”, “b”, “c”, “d”, “ee”, “f”\] I want to combine them with some rules s\[i\].size \> s\[i+1\].size combine them 2. s\[i+1\].size \>…

---

## [Is Red Dead?](https://www.ruby-forum.com/t/is-red-dead/147754)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 0\
**Last updated:** [September 5, 2008, 3:30am UTC](https://www.ruby-forum.com/t/is-red-dead/147754 "2008-09-05T03:30:08Z")

</div>

Is Red dead? There seems to be no activity at the mailing list: http://groups.google.com/group/ruby-red-js/topics?hl=en If Red is dead, is there another project like it alive? Thanks, T.

---

## [Arcfour encryption algorithm](https://www.ruby-forum.com/t/arcfour-encryption-algorithm/147555)

<div class="topic-metadata">

**Author:** [@CiriusMex](https://www.ruby-forum.com/u/CiriusMex)\
**Replies:** 3\
**Last updated:** [September 5, 2008, 2:45am UTC](https://www.ruby-forum.com/t/arcfour-encryption-algorithm/147555 "2008-09-05T02:45:05Z")

</div>

Hi folks, I’m looking for a way to use the arc4 encryption algorithm with RubyOnRails. I have some automatic mails in which there’s links to my website functions. In these links I want to encode various datas (such a…

---

## [Time::parse in ruby 1.9 with mm/dd/yyyy](https://www.ruby-forum.com/t/time-parse-in-ruby-1-9-with-mm-dd-yyyy/147718)

<div class="topic-metadata">

**Author:** [@Jim\_Cain](https://www.ruby-forum.com/u/Jim_Cain)\
**Replies:** 1\
**Last updated:** [September 5, 2008, 1:37am UTC](https://www.ruby-forum.com/t/time-parse-in-ruby-1-9-with-mm-dd-yyyy/147718 "2008-09-05T01:37:16Z")

</div>

In ruby 1.8, for dates in format mm/dd/yyyy, I get this: $ ruby -rparsedate -e ‘p ParseDate.parsedate(“09/01/2008”)’ \[2008, 9, 1, nil, nil, nil, nil, nil\] $ ruby -rtime -e ‘p Time.parse(“9/1/2008”)’ Mon Sep 01 00:00:…

---

## [Where the Required Things Are (#175)](https://www.ruby-forum.com/t/where-the-required-things-are-175/147714)

<div class="topic-metadata">

**Author:** [@mansfiem](https://www.ruby-forum.com/u/mansfiem)\
**Replies:** 4\
**Last updated:** [September 5, 2008, 12:15am UTC](https://www.ruby-forum.com/t/where-the-required-things-are-175/147714 "2008-09-05T00:15:23Z")

</div>

Great job on this quiz, everyone who submitted. I know I’ll be adding at least one of these submissions to my toolbox. Ten solutions were provided this week. I downloaded them all and tested each one in the manner req…

---

## [How to save Ruby object as a blob in MySQL](https://www.ruby-forum.com/t/how-to-save-ruby-object-as-a-blob-in-mysql/147745)

<div class="topic-metadata">

**Author:** [@roxah](https://www.ruby-forum.com/u/roxah)\
**Replies:** 5\
**Last updated:** [September 5, 2008, 12:07am UTC](https://www.ruby-forum.com/t/how-to-save-ruby-object-as-a-blob-in-mysql/147745 "2008-09-05T00:07:16Z")

</div>

Hello all, I’m using Ruby and Sequel on Windows to talk to a database on a Linux machine. The Sequel-to-MySQL connection is working fine – I can save and query for data no problems. However, I’m trying to save a Rub…

---

## [Ruby 1.8.6. - 100% CPU on OS X](https://www.ruby-forum.com/t/ruby-1-8-6-100-cpu-on-os-x/147660)

<div class="topic-metadata">

**Author:** [@revlob](https://www.ruby-forum.com/u/revlob)\
**Replies:** 7\
**Last updated:** [September 4, 2008, 11:50pm UTC](https://www.ruby-forum.com/t/ruby-1-8-6-100-cpu-on-os-x/147660 "2008-09-04T23:50:46Z")

</div>

Recently Ruby has decided to stomp my CPU. After running for a bit Ruby sometimes spikes to 100% CPU - even if I just have, say, the IRB open in terminal. Any ideas? David

---

## ['gem list --remote' is blank?](https://www.ruby-forum.com/t/gem-list-remote-is-blank/147738)

<div class="topic-metadata">

**Author:** [@jonlog](https://www.ruby-forum.com/u/jonlog)\
**Replies:** 7\
**Last updated:** [September 4, 2008, 11:25pm UTC](https://www.ruby-forum.com/t/gem-list-remote-is-blank/147738 "2008-09-04T23:25:00Z")

</div>

When running ‘gem list --remote’ on our linux and mac machines, we get a huge list of available gems, but when doing the same on a windows laptop in the office, we just get… \*\*\* REMOTE GEMS \*\*\* Bulk updating Gem sour…

---

## [String#match vs. Regexp#match - confused](https://www.ruby-forum.com/t/string-match-vs-regexp-match-confused/147733)

<div class="topic-metadata">

**Author:** [@kodama](https://www.ruby-forum.com/u/kodama)\
**Replies:** 2\
**Last updated:** [September 4, 2008, 11:03pm UTC](https://www.ruby-forum.com/t/string-match-vs-regexp-match-confused/147733 "2008-09-04T23:03:45Z")

</div>

Hello everyone, I’m very puzzled by the following: a = “.\*me” b = /.\*me/ test = “dont\_ignore.me.fixture” a.match(test) =\> nil b.match(test) =\> #MatchData:0x350fe8 Huh? When looking through the ri documentation f…

---

## [Want a spring and rails demo](https://www.ruby-forum.com/t/want-a-spring-and-rails-demo/146120)

<div class="topic-metadata">

**Author:** [@Yin\_AnPing](https://www.ruby-forum.com/u/Yin_AnPing)\
**Replies:** 6\
**Last updated:** [September 4, 2008, 11:01pm UTC](https://www.ruby-forum.com/t/want-a-spring-and-rails-demo/146120 "2008-09-04T23:01:36Z")

</div>

Hi, guys Where can I find a simple demo of using spring and rails together ? Spring for service layer and jruby on rails for web layer. I can’t find any on jruby.org and google. Maybe we shoule write something about …

---

## [Multiple jruby apps in tomcat](https://www.ruby-forum.com/t/multiple-jruby-apps-in-tomcat/147605)

<div class="topic-metadata">

**Author:** [@ADADAD](https://www.ruby-forum.com/u/ADADAD)\
**Replies:** 2\
**Last updated:** [September 4, 2008, 10:48pm UTC](https://www.ruby-forum.com/t/multiple-jruby-apps-in-tomcat/147605 "2008-09-04T22:48:06Z")

</div>

hello , I have 2 rails war files deployed into tomcat under JRuby, app1.war and app2.war. I am trying to setup 2 virtualhosts in apache to route the different hostnames to the war files under just / with no subdir, b…

---

## [Finding blocks in black-and-white images (efficiently)](https://www.ruby-forum.com/t/finding-blocks-in-black-and-white-images-efficiently/147489)

<div class="topic-metadata">

**Author:** [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Replies:** 6\
**Last updated:** [September 4, 2008, 10:24pm UTC](https://www.ruby-forum.com/t/finding-blocks-in-black-and-white-images-efficiently/147489 "2008-09-04T22:24:34Z")

</div>

Dear all, I have a number of black-and-white scanned pages. To prepare them for OCR, I have to split them in columns and rows. Additionally, somewhere in between, there are pictures, which also need to be separated. …

---

## [Creating method dynamically](https://www.ruby-forum.com/t/creating-method-dynamically/147711)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 1\
**Last updated:** [September 4, 2008, 8:23pm UTC](https://www.ruby-forum.com/t/creating-method-dynamically/147711 "2008-09-04T20:23:25Z")

</div>

Hello i have the following ruby code, to create class method dynamically for my module M: module M def self.create\_method(name, &block) eigen=class \<\< self; self; end eigen.module\_eval do define\_method(name, &bloc…

---

## [New to YAML/Ruby](https://www.ruby-forum.com/t/new-to-yaml-ruby/147732)

<div class="topic-metadata">

**Author:** [@enchanter](https://www.ruby-forum.com/u/enchanter)\
**Replies:** 1\
**Last updated:** [September 4, 2008, 7:58pm UTC](https://www.ruby-forum.com/t/new-to-yaml-ruby/147732 "2008-09-04T19:58:12Z")

</div>

So, I have been interested in working in YAML but have found a very little amount of ruby specific resources. I wanted to incorporate YAML into a basic MADlib engine for the heck of it, but I’m not to keen on reading …

---

## [Code Review: config-2](https://www.ruby-forum.com/t/code-review-config-2/147729)

<div class="topic-metadata">

**Author:** [@John\_LSSIRONRUBY](https://www.ruby-forum.com/u/John_LSSIRONRUBY)\
**Replies:** 1\
**Last updated:** [September 4, 2008, 7:51pm UTC](https://www.ruby-forum.com/t/code-review-config-2/147729 "2008-09-04T19:51:08Z")

</div>

tfpt review “/shelveset:config-2;REDMOND\\jflam” Comment : Updated Rakefile to correctly transform \*.csproj files to map to a transformed app.config file which removes signing on SVN layout builds.

---

## [Pushing a record into an inst. vaariable](https://www.ruby-forum.com/t/pushing-a-record-into-an-inst-vaariable/147708)

<div class="topic-metadata">

**Author:** [@mosar](https://www.ruby-forum.com/u/mosar)\
**Replies:** 1\
**Last updated:** [September 4, 2008, 4:18pm UTC](https://www.ruby-forum.com/t/pushing-a-record-into-an-inst-vaariable/147708 "2008-09-04T16:18:19Z")

</div>

In a study(#31) published by the American Accounting Association, prof Ijiri has suggested a new way to treat accounting transactions by mean of asymetrical arrays and using wealth and income accounts instead of debi…

---

## [How would this Perl script look in Ruby?](https://www.ruby-forum.com/t/how-would-this-perl-script-look-in-ruby/147109)

<div class="topic-metadata">

**Author:** [@avinash](https://www.ruby-forum.com/u/avinash)\
**Replies:** 7\
**Last updated:** [September 4, 2008, 4:15pm UTC](https://www.ruby-forum.com/t/how-would-this-perl-script-look-in-ruby/147109 "2008-09-04T16:15:58Z")

</div>

Can somebody please me tell the way to write this script in Ruby? ;--------------------------------------- #!/bin/env perl use strict; use Data::Dumper; #; define some message templates here my $message\_templates =…

---

## [Simple, array question!](https://www.ruby-forum.com/t/simple-array-question/147335)

<div class="topic-metadata">

**Author:** [@his2000x](https://www.ruby-forum.com/u/his2000x)\
**Replies:** 7\
**Last updated:** [September 4, 2008, 3:45pm UTC](https://www.ruby-forum.com/t/simple-array-question/147335 "2008-09-04T15:45:00Z")

</div>

hi! Gentlemen i don’t understand array declaration… c languages, array declaration is… char str\[100\]; but, how do i declaration an array for ruby… oo is difficult… plz teach me …

---

## [Can a Ruby program determine whether it's running on a 32-bit or 64-bit system?](https://www.ruby-forum.com/t/can-a-ruby-program-determine-whether-its-running-on-a-32-bit-or-64-bit-system/147552)

<div class="topic-metadata">

**Author:** [@epasquier](https://www.ruby-forum.com/u/epasquier)\
**Replies:** 5\
**Last updated:** [September 4, 2008, 3:33pm UTC](https://www.ruby-forum.com/t/can-a-ruby-program-determine-whether-its-running-on-a-32-bit-or-64-bit-system/147552 "2008-09-04T15:33:07Z")

</div>

I can’t go by RUBY\_PLATFORM – I’m setting up a new 32-bit Linux box, and RUBY\_PLATFORM is set to “i686-linux”. Or maybe this is a bug – repaved machine, installed Fedora Core 9, downloaded and built a vanilla Ruby 1.8…

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

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