# Ruby

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

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

---

## [How to check for where a text file begins?](https://www.ruby-forum.com/t/how-to-check-for-where-a-text-file-begins/108389)

<div class="topic-metadata">

**Author:** [@desertfox](https://www.ruby-forum.com/u/desertfox)\
**Replies:** 2\
**Last updated:** [July 3, 2007, 4:34pm UTC](https://www.ruby-forum.com/t/how-to-check-for-where-a-text-file-begins/108389 "2007-07-03T16:34:41Z")

</div>

Hello, Im working with some imported text files and I need check where the first 2 lines of text occur. The files can have white space in the beginning, so I cant just do a split("\\n") and take the first two element…

---

## [Feature Request: Special file '-' denoting stdin/stdout](https://www.ruby-forum.com/t/feature-request-special-file-denoting-stdin-stdout/108139)

<div class="topic-metadata">

**Author:** [@ronaldfischer](https://www.ruby-forum.com/u/ronaldfischer)\
**Replies:** 11\
**Last updated:** [July 3, 2007, 4:18pm UTC](https://www.ruby-forum.com/t/feature-request-special-file-denoting-stdin-stdout/108139 "2007-07-03T16:18:35Z")

</div>

I would like to propose a feature for Ruby which can be found in Perl, and which is also frequently found in many Unix utilities and to my knowledge in all of the Gnu stuff: When a file is opened for reading, and the…

---

## [Name clash in C extension](https://www.ruby-forum.com/t/name-clash-in-c-extension/107684)

<div class="topic-metadata">

**Author:** [@oscar-alexander](https://www.ruby-forum.com/u/oscar-alexander)\
**Replies:** 3\
**Last updated:** [July 3, 2007, 4:07pm UTC](https://www.ruby-forum.com/t/name-clash-in-c-extension/107684 "2007-07-03T16:07:47Z")

</div>

Hi, I’m trying to write an extension interfacing with the C iGraph library (http://cneurocvs.rmki.kfki.hu/igraph/). Unfortunately the iGraph header files define a macro called TYPE which clashes with the TYPE macro d…

---

## [I've um... broken Ruby](https://www.ruby-forum.com/t/ive-um-broken-ruby/108333)

<div class="topic-metadata">

**Author:** [@Sharon\_P](https://www.ruby-forum.com/u/Sharon_P)\
**Replies:** 11\
**Last updated:** [July 3, 2007, 3:35pm UTC](https://www.ruby-forum.com/t/ive-um-broken-ruby/108333 "2007-07-03T15:35:23Z")

</div>

Hi, I’ve run amuck Sunday afternoon trying to install fxRuby and fox under OSX, and after many hours of errors, trying mac-ports, fink, building from source, updating to Ruby 1.8.6 (from 1.8.4) and ripping various bi…

---

## [LSRC Name Picker](https://www.ruby-forum.com/t/lsrc-name-picker/108411)

<div class="topic-metadata">

**Author:** [@Ari\_B](https://www.ruby-forum.com/u/Ari_B)\
**Replies:** 4\
**Last updated:** [July 3, 2007, 3:10pm UTC](https://www.ruby-forum.com/t/lsrc-name-picker/108411 "2007-07-03T15:10:20Z")

</div>

Hey all. I seem to get this error whenever I run my program. -----------------------------------------------------------| ERROR -----------------------------------------------------------| namePicker-cli.rb:58: synt…

---

## [Why 1.hour doesn't work?](https://www.ruby-forum.com/t/why-1-hour-doesnt-work/108337)

<div class="topic-metadata">

**Author:** [@Kenneth](https://www.ruby-forum.com/u/Kenneth)\
**Replies:** 5\
**Last updated:** [July 3, 2007, 2:59pm UTC](https://www.ruby-forum.com/t/why-1-hour-doesnt-work/108337 "2007-07-03T14:59:17Z")

</div>

this is a newbie question: so if it is in Ruby on Rails, then 1.hour and 1.hour.from\_now both work… now then, how come in irb, they both don’t work?

---

## [Thread](https://www.ruby-forum.com/t/thread/108426)

<div class="topic-metadata">

**Author:** [@sirtyman](https://www.ruby-forum.com/u/sirtyman)\
**Replies:** 2\
**Last updated:** [July 3, 2007, 1:05pm UTC](https://www.ruby-forum.com/t/thread/108426 "2007-07-03T13:05:57Z")

</div>

Hi, My code looks similar to following: def someFunction() #do telnet connection #execute binary file which throws on std its output endlessly end tr = Thread.new() { someFunction() } while true sth to done … a…

---

## [Getting rid of $0](https://www.ruby-forum.com/t/getting-rid-of-0/108363)

<div class="topic-metadata">

**Author:** [@micheldogger](https://www.ruby-forum.com/u/micheldogger)\
**Replies:** 6\
**Last updated:** [July 3, 2007, 8:44am UTC](https://www.ruby-forum.com/t/getting-rid-of-0/108363 "2007-07-03T08:44:17Z")

</div>

The common idiom if FILE == $0 then … gives bugs when $0 is not what one would expect, for instance under a debugger, or in rubyscript2exe, etc. There should be a primitive test if then…

---

## [$&;\[\] dumps core](https://www.ruby-forum.com/t/dumps-core/107920)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 12\
**Last updated:** [July 3, 2007, 7:30am UTC](https://www.ruby-forum.com/t/dumps-core/107920 "2007-07-03T07:30:09Z")

</div>

e$B1sF#$H?=$7$^$9!#e(B 1.9 e$B$G0J2\<$N$h$&$K$9$k$HMn$A$^$9!#e(B $ ./ruby -e ‘$&;\[\]’ -e:1: – control frame ---------- c:0003 p:0006 s:0006 b:0005 l:000004 d:000004 TOP -e:1 c:0002 p:---- s:0003 b:0003 l:000002 d:0…

---

## [Test equality of each element in an array](https://www.ruby-forum.com/t/test-equality-of-each-element-in-an-array/108260)

<div class="topic-metadata">

**Author:** [@mtnbiker](https://www.ruby-forum.com/u/mtnbiker)\
**Replies:** 14\
**Last updated:** [July 3, 2007, 3:57am UTC](https://www.ruby-forum.com/t/test-equality-of-each-element-in-an-array/108260 "2007-07-03T03:57:44Z")

</div>

I want to see if any element of an array is equal to a file extension Something like require ‘find’ require ‘FileUtils’ src="/folder/on/drive/which/contains/other/folder/and/files" dest =‘another place’ extNot2move…

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/108394)

<div class="topic-metadata">

**Author:** [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Replies:** 0\
**Last updated:** [July 3, 2007, 3:08am UTC](https://www.ruby-forum.com/t/no-subject/108394 "2007-07-03T03:08:41Z")

</div>

NAME flatulent : CAPTCHA for FIGLET. SYNOPSIS the flatulent gem provides brain dead simple ascii art captcha for ruby. URI http://codeforpeople.com/lib/ruby http://rubyforge.org/projects/codeforpeople INSTALL ge…

---

## [Absolutely lost with URI/Net/HTTP](https://www.ruby-forum.com/t/absolutely-lost-with-uri-net-http/108391)

<div class="topic-metadata">

**Author:** [@guest](https://www.ruby-forum.com/u/guest)\
**Replies:** 2\
**Last updated:** [July 3, 2007, 2:22am UTC](https://www.ruby-forum.com/t/absolutely-lost-with-uri-net-http/108391 "2007-07-03T02:22:38Z")

</div>

is it possible to download a file with a PHP hidden URL? when the link is clicked on in firefox, it will prompt the user to either open or save, for example… http://www.esnips.com/nsdoc/b2a4a221-2590-486f-a314-469a472…

---

## [Testing for warnings](https://www.ruby-forum.com/t/testing-for-warnings/108320)

<div class="topic-metadata">

**Author:** [@oscar-alexander](https://www.ruby-forum.com/u/oscar-alexander)\
**Replies:** 3\
**Last updated:** [July 3, 2007, 1:53am UTC](https://www.ruby-forum.com/t/testing-for-warnings/108320 "2007-07-03T01:53:37Z")

</div>

Is there a way of asserting that a warning is raised in a unit test? So I could write something like: assert\_warns “Blah blah” do function\_that\_warns(foo) end I can’t seem to find anything in the test/unit docs, but i…

---

## [Console Application Keyboard event catch](https://www.ruby-forum.com/t/console-application-keyboard-event-catch/108311)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [July 2, 2007, 11:36pm UTC](https://www.ruby-forum.com/t/console-application-keyboard-event-catch/108311 "2007-07-02T23:36:21Z")

</div>

Dear All, While doing the console application with Ruby, met below questions, please help, thanks in advance, How to catch the Keyboard event, such as, how about the \[TAB\] key pressed, \[CTRL\] key and so on; How to b…

---

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

<div class="topic-metadata">

**Author:** [@maung](https://www.ruby-forum.com/u/maung)\
**Replies:** 1\
**Last updated:** [July 2, 2007, 9:57pm UTC](https://www.ruby-forum.com/t/string-usage/108374 "2007-07-02T21:57:42Z")

</div>

Hi all, I have a question about string usage. I assign @test\_string class variable which is assigned the name of a text file. @test\_string = ‘file.txt’ When I was trying to use it as a parameter in a statement info=…

---

## [Rake::Filelist and symbolic links](https://www.ruby-forum.com/t/rake-filelist-and-symbolic-links/108368)

<div class="topic-metadata">

**Author:** [@Don\_McClean](https://www.ruby-forum.com/u/Don_McClean)\
**Replies:** 0\
**Last updated:** [July 2, 2007, 9:20pm UTC](https://www.ruby-forum.com/t/rake-filelist-and-symbolic-links/108368 "2007-07-02T21:20:04Z")

</div>

I am using the Rake::FileList class as part of a DSL to allow users to specify files to include/exclude. It appears that symbolic links are not being followed correctly, as only directories underneath a linked direc…

---

## [Before\_call, after\_call, assert, ... why not?](https://www.ruby-forum.com/t/before-call-after-call-assert-why-not/108369)

<div class="topic-metadata">

**Author:** [@dohzya](https://www.ruby-forum.com/u/dohzya)\
**Replies:** 0\
**Last updated:** [July 2, 2007, 8:42pm UTC](https://www.ruby-forum.com/t/before-call-after-call-assert-why-not/108369 "2007-07-02T20:42:59Z")

</div>

Hi, I am a new Ruby addict, and I’ve a question/suggestion (sorry…). I will try to explain myself by an example. I tried to add assertions possibility in ruby, but I think it’s not the best way to put them hardly in m…

---

## [Support for ruby 1.9](https://www.ruby-forum.com/t/support-for-ruby-1-9/108317)

<div class="topic-metadata">

**Author:** [@Daniel\_DeLorme](https://www.ruby-forum.com/u/Daniel_DeLorme)\
**Replies:** 3\
**Last updated:** [July 2, 2007, 7:46pm UTC](https://www.ruby-forum.com/t/support-for-ruby-1-9/108317 "2007-07-02T19:46:45Z")

</div>

Is there some kind of package out there that would allow me to develop in ruby 1.8 while avoiding incompatibility with 1.9? Something that for example would: define String#lines warn me when I use String#to\_a define…

---

## [Creating a DSL in ruby](https://www.ruby-forum.com/t/creating-a-dsl-in-ruby/108122)

<div class="topic-metadata">

**Author:** [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Replies:** 5\
**Last updated:** [July 2, 2007, 6:11pm UTC](https://www.ruby-forum.com/t/creating-a-dsl-in-ruby/108122 "2007-07-02T18:11:36Z")

</div>

I’m getting back to a project I’ve wanted to do for a while now, which is to create a DSL for recurring payments. Something like the following: Charge $10 on date X then $20 every month for 12 months starting on date …

---

## [Nested Mixin Problem(?)](https://www.ruby-forum.com/t/nested-mixin-problem/108306)

<div class="topic-metadata">

**Author:** [@vascoas](https://www.ruby-forum.com/u/vascoas)\
**Replies:** 4\
**Last updated:** [July 2, 2007, 6:07pm UTC](https://www.ruby-forum.com/t/nested-mixin-problem/108306 "2007-07-02T18:07:38Z")

</div>

Hi, could someone check and comment if this is something that i don’t understand well or a ruby “somehow” problem? please Here’s the code: module A def a; :a; end end module B include A def b; :b; end end modu…

---

## [Check ARGV for option (what parser to use?)](https://www.ruby-forum.com/t/check-argv-for-option-what-parser-to-use/108346)

<div class="topic-metadata">

**Author:** [@boersnoes](https://www.ruby-forum.com/u/boersnoes)\
**Replies:** 1\
**Last updated:** [July 2, 2007, 4:46pm UTC](https://www.ruby-forum.com/t/check-argv-for-option-what-parser-to-use/108346 "2007-07-02T16:46:00Z")

</div>

Dear mailinglist, Currently I’m eluded by the ARGV parser GetoptLong. All the example show me the same structure that just itterates through all the parsed flags and then overwrite a previously set standard value whe…

---

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

<div class="topic-metadata">

**Author:** [@donv](https://www.ruby-forum.com/u/donv)\
**Replies:** 0\
**Last updated:** [July 2, 2007, 4:40pm UTC](https://www.ruby-forum.com/t/ruby-odbc/108347 "2007-07-02T16:40:59Z")

</div>

Hi all! I am trying to use ActiveRecord migrations from Linux on an MS SQL Server database running on windows. I am following the instructions given in http://wiki.rubyonrails.org/rails/pages/HowtoConnectToMicrosoft…

---

## [Simple math operations on arrays](https://www.ruby-forum.com/t/simple-math-operations-on-arrays/108270)

<div class="topic-metadata">

**Author:** [@baptiste\_AuguiSSSS](https://www.ruby-forum.com/u/baptiste_AuguiSSSS)\
**Replies:** 7\
**Last updated:** [July 2, 2007, 4:31pm UTC](https://www.ruby-forum.com/t/simple-math-operations-on-arrays/108270 "2007-07-02T16:31:59Z")

</div>

Hi, Again a very basic problem, I need to create arrays with numerical values, and do very simple math operations on each elements. I’ve tried to install ruby-gsl as suggested but I don’t have admin rights on the mac…

---

## [@0..0 dumps core](https://www.ruby-forum.com/t/0-0-dumps-core/108163)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 1\
**Last updated:** [July 2, 2007, 3:53pm UTC](https://www.ruby-forum.com/t/0-0-dumps-core/108163 "2007-07-02T15:53:54Z")

</div>

e$B1sF#$H?=$7$^$9!#e(B 1.8.6 e$B!"e(B1.9 e$B6&$K0J2\<$N$h$&$K$9$k$HMn$A$^$9!#e(B $ ./ruby -e ‘@0…0’ -e:1: \`@0’ is not allowed as an instance variable name -e:1: identifier @0 is not valid -e:1: \[BUG\] Segmentation fau…

---

## [Plug-in org.rubypeople.rdt.debug.ui was unable to load class](https://www.ruby-forum.com/t/plug-in-org-rubypeople-rdt-debug-ui-was-unable-to-load-class/103594)

<div class="topic-metadata">

**Author:** [@CsO](https://www.ruby-forum.com/u/CsO)\
**Replies:** 1\
**Last updated:** [July 2, 2007, 3:47pm UTC](https://www.ruby-forum.com/t/plug-in-org-rubypeople-rdt-debug-ui-was-unable-to-load-class/103594 "2007-07-02T15:47:18Z")

</div>

Hiya, I’m following the tutorial at: I’ve got: Eclipse SDK Version: 3.2.2 Build id: M20070212-1330 ruby 1.8.6 (2007-03-13 patchlevel 0) \[i386-mswin32\] RDT Version 0.9.0.200704141430RC1 Basically the latest stable…

---

## [Msvcr\*.dll](https://www.ruby-forum.com/t/msvcr-dll/108097)

<div class="topic-metadata">

**Author:** [@Morris\_Brodersen](https://www.ruby-forum.com/u/Morris_Brodersen)\
**Replies:** 3\
**Last updated:** [July 2, 2007, 2:42pm UTC](https://www.ruby-forum.com/t/msvcr-dll/108097 "2007-07-02T14:42:12Z")

</div>

hi, i’m trying to build a ruby extension in c on windows, using mingw32’s gcc. these are the two compile commands i use: gcc -o tga.o tga.c -c -I c:/ruby/lib/ruby/1.8/i386-mswin32 gcc -shared -o tga.so tga.o -Wl,c:…

---

## [Curious termination on connecting via SSL](https://www.ruby-forum.com/t/curious-termination-on-connecting-via-ssl/108338)

<div class="topic-metadata">

**Author:** [@joep](https://www.ruby-forum.com/u/joep)\
**Replies:** 0\
**Last updated:** [July 2, 2007, 1:11pm UTC](https://www.ruby-forum.com/t/curious-termination-on-connecting-via-ssl/108338 "2007-07-02T13:11:06Z")

</div>

Hi Firstly, just wanted to say the documentation on here is great, its helped me out a lot. However, in my recent code, I’ve run into a bug which I can’t work out why it is happening. I’m attempting to submit a POST …

---

## [Accessing functions in a module without 'include'](https://www.ruby-forum.com/t/accessing-functions-in-a-module-without-include/108140)

<div class="topic-metadata">

**Author:** [@ronaldfischer](https://www.ruby-forum.com/u/ronaldfischer)\
**Replies:** 6\
**Last updated:** [July 2, 2007, 12:58pm UTC](https://www.ruby-forum.com/t/accessing-functions-in-a-module-without-include/108140 "2007-07-02T12:58:30Z")

</div>

Usually I work with modules like this: Defining a module in one file module M def f(x) … end end Using the module in another file require ‘M’ include M f(45) Sometimes I would find it more convenient to not inje…

---

## [Invoke remote Application](https://www.ruby-forum.com/t/invoke-remote-application/108332)

<div class="topic-metadata">

**Author:** [@dgirdhar](https://www.ruby-forum.com/u/dgirdhar)\
**Replies:** 0\
**Last updated:** [July 2, 2007, 12:38pm UTC](https://www.ruby-forum.com/t/invoke-remote-application/108332 "2007-07-02T12:38:45Z")

</div>

Hi, If I have access to any other machine then can I invoke any other Ruby application on that machine? Regards: Dhiraj

---

## [Assignment syntax](https://www.ruby-forum.com/t/assignment-syntax/108330)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [July 2, 2007, 12:16pm UTC](https://www.ruby-forum.com/t/assignment-syntax/108330 "2007-07-02T12:16:25Z")

</div>

e$B;W$C$?$N$G$9$,!"e(B\*,v = 0 e$B$,e(B syntax error e$B$J$N$O0U?^$5$l$?$b$Ne(B e$B$G$9$+e(B? % ./ruby -ve ‘\*,v = 0’ ruby 1.9.0 (2007-07-02 patchlevel 0) \[i686-linux\] syntax error, unexpected ‘=’, expecting ‘,’ \*,v …

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

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