# Ruby

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

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

---

## [Audit your gems (excellent blog post)](https://www.ruby-forum.com/t/audit-your-gems-excellent-blog-post/87807)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 0\
**Last updated:** [March 6, 2007, 3:36am UTC](https://www.ruby-forum.com/t/audit-your-gems-excellent-blog-post/87807 "2007-03-06T03:36:32Z")

</div>

In which Evan W. successfully changes his root password with a gem called Malice.

---

## [Getting the size of the terminal in a portable way](https://www.ruby-forum.com/t/getting-the-size-of-the-terminal-in-a-portable-way/87749)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 3\
**Last updated:** [March 6, 2007, 2:02am UTC](https://www.ruby-forum.com/t/getting-the-size-of-the-terminal-in-a-portable-way/87749 "2007-03-06T02:02:24Z")

</div>

I’d like to be able to determine the width of the terminal in which my command-line tool is running. I made a quick program to find out the value of TIOCGWINSZ on my system (Mac OS X 10.4.8, running on Intel): #inclu…

---

## [$SAFE reset when proc called (1.8.4)](https://www.ruby-forum.com/t/safe-reset-when-proc-called-1-8-4/87790)

<div class="topic-metadata">

**Author:** [@kelleysislander](https://www.ruby-forum.com/u/kelleysislander)\
**Replies:** 2\
**Last updated:** [March 6, 2007, 1:10am UTC](https://www.ruby-forum.com/t/safe-reset-when-proc-called-1-8-4/87790 "2007-03-06T01:10:19Z")

</div>

Hi, I’m wondering if this is a bug? When the proc is called, the safe\_level is reverting to zero: $ cat safe-test4.rb pr = lambda{ puts “my\_safe\_level=#{Thread.current.safe\_level}” } th = Thread.new(pr) do |pr\_| $…

---

## [Ruby (rails) and rjb: java File I/O](https://www.ruby-forum.com/t/ruby-rails-and-rjb-java-file-i-o/87784)

<div class="topic-metadata">

**Author:** [@msojka](https://www.ruby-forum.com/u/msojka)\
**Replies:** 0\
**Last updated:** [March 5, 2007, 11:16pm UTC](https://www.ruby-forum.com/t/ruby-rails-and-rjb-java-file-i-o/87784 "2007-03-05T23:16:08Z")

</div>

I am trying to do file i/o with rails and rjb and can’t figure out a way to make this work. Here’s what I am trying to do: a user uploads an image to the server via a standard html form: \<%= file\_field(“blog”, “atta…

---

## [Hash keys don't work as expected](https://www.ruby-forum.com/t/hash-keys-dont-work-as-expected/87463)

<div class="topic-metadata">

**Author:** [@DKDKDK](https://www.ruby-forum.com/u/DKDKDK)\
**Replies:** 10\
**Last updated:** [March 5, 2007, 10:51pm UTC](https://www.ruby-forum.com/t/hash-keys-dont-work-as-expected/87463 "2007-03-05T22:51:03Z")

</div>

Hello. I am new to Ruby. I am more familiar with Python, whose hash keys are immutable, so I was surprised that Ruby’s were not. When I try to retrieve a value from a hash after manipulating the associated key, it …

---

## [Attr\_reader explained](https://www.ruby-forum.com/t/attr-reader-explained/87548)

<div class="topic-metadata">

**Author:** [@etikette](https://www.ruby-forum.com/u/etikette)\
**Replies:** 5\
**Last updated:** [March 5, 2007, 10:30pm UTC](https://www.ruby-forum.com/t/attr-reader-explained/87548 "2007-03-05T22:30:00Z")

</div>

can someone explain how attr\_reader works? i can’t find a good explanation anywhere. please help!

---

## [Bash completion for the gem command](https://www.ruby-forum.com/t/bash-completion-for-the-gem-command/86654)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 3\
**Last updated:** [March 5, 2007, 10:24pm UTC](https://www.ruby-forum.com/t/bash-completion-for-the-gem-command/86654 "2007-03-05T22:24:59Z")

</div>

To my surprise there apparently hasn’t been support for bash command line completion for the gem command. I’ve cobbled together a file that add just that. See http://schuerig.de/michael/blog/index.php/2007/02/24/gem-b…

---

## [How can I make an FXRuby window stay open for a set amount o](https://www.ruby-forum.com/t/how-can-i-make-an-fxruby-window-stay-open-for-a-set-amount-o/87757)

<div class="topic-metadata">

**Author:** [@paul](https://www.ruby-forum.com/u/paul)\
**Replies:** 2\
**Last updated:** [March 5, 2007, 10:20pm UTC](https://www.ruby-forum.com/t/how-can-i-make-an-fxruby-window-stay-open-for-a-set-amount-o/87757 "2007-03-05T22:20:59Z")

</div>

I wrote a simple FXRuby program that displays a message in a window on the desktop. I would like to make this window go away after a set amount of time (e.g. 30 minutes if left alone). I’m new to scripting in Ruby, s…

---

## [Send fax in windows with ruby](https://www.ruby-forum.com/t/send-fax-in-windows-with-ruby/87772)

<div class="topic-metadata">

**Author:** [@ualex](https://www.ruby-forum.com/u/ualex)\
**Replies:** 0\
**Last updated:** [March 5, 2007, 10:10pm UTC](https://www.ruby-forum.com/t/send-fax-in-windows-with-ruby/87772 "2007-03-05T22:10:57Z")

</div>

Hello, I newbie in ruby there is any api for send fax by ruby , I already rfax in java but don’t have sucess, now i try ruby. thanks a lot.

---

## [How to set gtk2 combo box entry place](https://www.ruby-forum.com/t/how-to-set-gtk2-combo-box-entry-place/87767)

<div class="topic-metadata">

**Author:** [@nephish](https://www.ruby-forum.com/u/nephish)\
**Replies:** 2\
**Last updated:** [March 5, 2007, 10:06pm UTC](https://www.ruby-forum.com/t/how-to-set-gtk2-combo-box-entry-place/87767 "2007-03-05T22:06:56Z")

</div>

OK, i am using ruby-gnome2 to develop a gui app. I have a combobox that i create with Gtk.ComboBox.new this is so i can populate it with append\_text() and prepend\_text() my question is, i need to be able to set it to…

---

## [Thead.parent, revisited. Or: Building a call stack](https://www.ruby-forum.com/t/thead-parent-revisited-or-building-a-call-stack/87739)

<div class="topic-metadata">

**Author:** [@erikveen](https://www.ruby-forum.com/u/erikveen)\
**Replies:** 3\
**Last updated:** [March 5, 2007, 9:41pm UTC](https://www.ruby-forum.com/t/thead-parent-revisited-or-building-a-call-stack/87739 "2007-03-05T21:41:53Z")

</div>

In order to build a diagram of all method calls in an application, I created a set\_trace\_func function. This function builds a call stack. Each thread in each process should have its own call stack, initialized to the…

---

## [Recvfrom broken on mswin32?](https://www.ruby-forum.com/t/recvfrom-broken-on-mswin32/87377)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [March 5, 2007, 8:58pm UTC](https://www.ruby-forum.com/t/recvfrom-broken-on-mswin32/87377 "2007-03-05T20:58:46Z")

</div>

ruby -v ruby 1.8.5 (2006-12-25 patchlevel 12) \[i386-mswin32\] I’m also running on windows vista, but I don’t know if this is an issue on the overall mswin32-x86 platform. I’m getting an error when trying to recvfrom…

---

## [Replacing the use of gettimeofday in the scheduler](https://www.ruby-forum.com/t/replacing-the-use-of-gettimeofday-in-the-scheduler/87301)

<div class="topic-metadata">

**Author:** [@Tomas\_P](https://www.ruby-forum.com/u/Tomas_P)\
**Replies:** 23\
**Last updated:** [March 5, 2007, 8:44pm UTC](https://www.ruby-forum.com/t/replacing-the-use-of-gettimeofday-in-the-scheduler/87301 "2007-03-05T20:44:41Z")

</div>

using gettimeofday in the scheduler is problematic, since it’s possible that the system time will jump ahead or back because of the user or ntp resetting the time \[1\]. This can have side effects such as sleep() and t…

---

## [Ruby 1.8.5-24 rubyw does not work](https://www.ruby-forum.com/t/ruby-1-8-5-24-rubyw-does-not-work/87716)

<div class="topic-metadata">

**Author:** [@ctyu](https://www.ruby-forum.com/u/ctyu)\
**Replies:** 4\
**Last updated:** [March 5, 2007, 7:55pm UTC](https://www.ruby-forum.com/t/ruby-1-8-5-24-rubyw-does-not-work/87716 "2007-03-05T19:55:35Z")

</div>

Hi All rubyw hasnt worked for me since first release 1.8.5 Does anyone has the same problem? ctyu

---

## [How do I find a Windows process with a specific Window Title](https://www.ruby-forum.com/t/how-do-i-find-a-windows-process-with-a-specific-window-title/87742)

<div class="topic-metadata">

**Author:** [@paul](https://www.ruby-forum.com/u/paul)\
**Replies:** 2\
**Last updated:** [March 5, 2007, 7:27pm UTC](https://www.ruby-forum.com/t/how-do-i-find-a-windows-process-with-a-specific-window-title/87742 "2007-03-05T19:27:31Z")

</div>

Hi there. I’m still kind of new to scripting with Ruby. I have written a small Ruby/Fox app that displays a message in a window at regular intervals. The ‘regular intervals’ part is done using the Windows Task Sche…

---

## [Re: GOPS (#116)](https://www.ruby-forum.com/t/re-gops-116/87752)

<div class="topic-metadata">

**Author:** [@doug\_meyer](https://www.ruby-forum.com/u/doug_meyer)\
**Replies:** 0\
**Last updated:** [March 5, 2007, 7:16pm UTC](https://www.ruby-forum.com/t/re-gops-116/87752 "2007-03-05T19:16:29Z")

</div>

This bot isn’t as in depth as I initially hoped for, but I got a bit distracted researching game theory and probability. But still, I don’t think I’m done with this quiz yet. The basic strategy for this bot is to play…

---

## [Instance\_exec in 1.8](https://www.ruby-forum.com/t/instance-exec-in-1-8/87748)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 0\
**Last updated:** [March 5, 2007, 6:44pm UTC](https://www.ruby-forum.com/t/instance-exec-in-1-8/87748 "2007-03-05T18:44:23Z")

</div>

How about backporting #instance\_exec to 1.8 series. Please. T.

---

## [Question re DL and INT16\_T return values](https://www.ruby-forum.com/t/question-re-dl-and-int16-t-return-values/87671)

<div class="topic-metadata">

**Author:** [@CWCWCW](https://www.ruby-forum.com/u/CWCWCW)\
**Replies:** 2\
**Last updated:** [March 5, 2007, 6:03pm UTC](https://www.ruby-forum.com/t/question-re-dl-and-int16-t-return-values/87671 "2007-03-05T18:03:16Z")

</div>

I am trying to call a function in Win32 DLL that returns a INT16\_T value. My attempts using both Win32API and DL to invoke the function both return a value of 47644672. I have no idea how to correctly decode/interpr…

---

## [How to coloring Windows command prompt in irb?](https://www.ruby-forum.com/t/how-to-coloring-windows-command-prompt-in-irb/87736)

<div class="topic-metadata">

**Author:** [@shinwoo](https://www.ruby-forum.com/u/shinwoo)\
**Replies:** 1\
**Last updated:** [March 5, 2007, 5:53pm UTC](https://www.ruby-forum.com/t/how-to-coloring-windows-command-prompt-in-irb/87736 "2007-03-05T17:53:14Z")

</div>

Is there any gem or ruby script to make irb command prompt in windows color? I found a gem ‘wirble’ which is very nice but it only works in Linux or Mac. It can’t work in cygwin or windows command prompt. I searching …

---

## [Nested blocks](https://www.ruby-forum.com/t/nested-blocks/87722)

<div class="topic-metadata">

**Author:** [@Josselin](https://www.ruby-forum.com/u/Josselin)\
**Replies:** 6\
**Last updated:** [March 5, 2007, 5:51pm UTC](https://www.ruby-forum.com/t/nested-blocks/87722 "2007-03-05T17:51:14Z")

</div>

I am trying to nest 2 blocks, it’s wrong but but I cannot find why … need some help… I get only one resulting item I get info in geocodes Array (3 items) , need to get some of them into ‘places’ another Array plac…

---

## [Rubyw confusion](https://www.ruby-forum.com/t/rubyw-confusion/87730)

<div class="topic-metadata">

**Author:** [@alexd](https://www.ruby-forum.com/u/alexd)\
**Replies:** 2\
**Last updated:** [March 5, 2007, 5:37pm UTC](https://www.ruby-forum.com/t/rubyw-confusion/87730 "2007-03-05T17:37:10Z")

</div>

I know that using rubyw.exe will run my Ruby/TK applications without giving me a command line, but I don’t know how to set this up in Windows. For instance, right now if I double-click my ruby programs from Windows E…

---

## [Create a text file with ruby](https://www.ruby-forum.com/t/create-a-text-file-with-ruby/87678)

<div class="topic-metadata">

**Author:** [@mr\_brownstone](https://www.ruby-forum.com/u/mr_brownstone)\
**Replies:** 6\
**Last updated:** [March 5, 2007, 5:13pm UTC](https://www.ruby-forum.com/t/create-a-text-file-with-ruby/87678 "2007-03-05T17:13:00Z")

</div>

How make for create a text file using ruby? And how a make for updated this text file?

---

## [FXTable](https://www.ruby-forum.com/t/fxtable/87697)

<div class="topic-metadata">

**Author:** [@jabe](https://www.ruby-forum.com/u/jabe)\
**Replies:** 1\
**Last updated:** [March 5, 2007, 4:35pm UTC](https://www.ruby-forum.com/t/fxtable/87697 "2007-03-05T16:35:53Z")

</div>

when I use an FXTable in an FxRuby-Application, an random-crash (often after some minutes) occurs Code (cyclic refresh-method): def onUpdMode(sender, sel, ptr) if(@table.numRows \< 10) @table.appendRows(2) else @ta…

---

## [NEWS is added](https://www.ruby-forum.com/t/news-is-added/87121)

<div class="topic-metadata">

**Author:** [@Akinori\_MUSHA](https://www.ruby-forum.com/u/Akinori_MUSHA)\
**Replies:** 5\
**Last updated:** [March 5, 2007, 3:26pm UTC](https://www.ruby-forum.com/t/news-is-added/87121 "2007-03-05T15:26:43Z")

</div>

ã€€ruby\_1\_8 ãƒ–ãƒ©ãƒ³ãƒã« NEWS ã¨ã„ã†ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ç½®ãã¾ã—ãŸã€‚ ã€€ã“ã‚Œã¯ã€ãƒ¦ãƒ¼ã‚¶å‘ã‘ã®æƒ…å ±ã¨ã—ã¦å„ãƒªãƒªãƒ¼ã‚¹é–“ã®æ©Ÿèƒ½çš„ãªå¤‰æ›´ç‚¹ã‚’ è¨˜è¿°ã—ãŸã‚‚ã®ã§ã€æ—©ã„è©±ãŒãƒªãƒªãƒ¼ã‚¹…

---

## [Mask gets\_chomp?](https://www.ruby-forum.com/t/mask-gets-chomp/87711)

<div class="topic-metadata">

**Author:** [@RebhanS\_Gilbert](https://www.ruby-forum.com/u/RebhanS_Gilbert)\
**Replies:** 3\
**Last updated:** [March 5, 2007, 3:17pm UTC](https://www.ruby-forum.com/t/mask-gets-chomp/87711 "2007-03-05T15:17:43Z")

</div>

Hi, i have a script that uses a password as input. The password is provided via gets\_chomp in the shell. Is there a way to mask the password with \* or do i have to write a gui for that ? Regards, Gilbert

---

## [IO.popen puts](https://www.ruby-forum.com/t/io-popen-puts/87701)

<div class="topic-metadata">

**Author:** [@RebhanS\_Gilbert](https://www.ruby-forum.com/u/RebhanS_Gilbert)\
**Replies:** 2\
**Last updated:** [March 5, 2007, 3:08pm UTC](https://www.ruby-forum.com/t/io-popen-puts/87701 "2007-03-05T15:08:42Z")

</div>

Hi, i want to do a cvs login for a list of cvsrepositories with IO.popen the normal login via Windows shell looks like = Y:\>cvs -d :pserver:username@cvshost:d:/cvsrepos/test login Logging in to :pserver:username@cvs…

---

## [Ruby noob](https://www.ruby-forum.com/t/ruby-noob/87707)

<div class="topic-metadata">

**Author:** [@mosfet](https://www.ruby-forum.com/u/mosfet)\
**Replies:** 2\
**Last updated:** [March 5, 2007, 1:15pm UTC](https://www.ruby-forum.com/t/ruby-noob/87707 "2007-03-05T13:15:19Z")

</div>

Hi, I would like to parse a very simple html(index\_msg.htm) file described below : WM\_ACTIVATE 0x0006 0x0000 WM\_NULL WM\_ACTIVATEAPP 0x001C 0x0001 WM\_CREATE ... I would like to par…

---

## [Ruby/erb S5 Helper?](https://www.ruby-forum.com/t/ruby-erb-s5-helper/87443)

<div class="topic-metadata">

**Author:** [@Mat\_S](https://www.ruby-forum.com/u/Mat_S)\
**Replies:** 4\
**Last updated:** [March 5, 2007, 11:34am UTC](https://www.ruby-forum.com/t/ruby-erb-s5-helper/87443 "2007-03-05T11:34:06Z")

</div>

I had a thought today about trying to create a ruby DSL for generating S5 presentations. Granted, S5 is fairly simple. But I think we could do better and have more functionality by using a combination of Rake and Er…

---

## [A regular expression problem](https://www.ruby-forum.com/t/a-regular-expression-problem/87685)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 6\
**Last updated:** [March 5, 2007, 9:41am UTC](https://www.ruby-forum.com/t/a-regular-expression-problem/87685 "2007-03-05T09:41:53Z")

</div>

hi,it seems that there’s some problem with the regeular expression processing in ruby,when I ran the code below, it happened that it loop for ever and would not get out. $value = “20053301831294544645645645634556354” …

---

## [String.each](https://www.ruby-forum.com/t/string-each/87503)

<div class="topic-metadata">

**Author:** [@Yannick\_G](https://www.ruby-forum.com/u/Yannick_G)\
**Replies:** 6\
**Last updated:** [March 5, 2007, 9:00am UTC](https://www.ruby-forum.com/t/string-each/87503 "2007-03-05T09:00:46Z")

</div>

Hello all! I’m fairly new to Ruby, and I’m trying to write a program that looks at each character of a string and then processes it using a block. I’ve been using: String.each do #block end but something isn’t wor…

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

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