# Ruby

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

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

---

## [Crosstab-0.1.0 Released](https://www.ruby-forum.com/t/crosstab-0-1-0-released/117645)

<div class="topic-metadata">

**Author:** [@bluetrust](https://www.ruby-forum.com/u/bluetrust)\
**Replies:** 3\
**Last updated:** [October 20, 2007, 3:56am UTC](https://www.ruby-forum.com/t/crosstab-0-1-0-released/117645 "2007-10-20T03:56:44Z")

</div>

crosstab version 0.1.0 has been released! \<by Michael J. removed\_email\_address@domain.invalid\> http://crosstab.rubyforge.org/ DESCRIPTION: Crosstab is a library for generating formatted pivot tables. FEATURES: Inp…

---

## [Simple code](https://www.ruby-forum.com/t/simple-code/117706)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [October 20, 2007, 3:31am UTC](https://www.ruby-forum.com/t/simple-code/117706 "2007-10-20T03:31:01Z")

</div>

hi #!/usr/bin/ruby -w re=Regexp.new(’\\s+\[A-Z\]’) puts " {| class=“wikitable” |- Table – put your title here |-" while line = gets md=re.match(line) if md =~ nil else puts md end end I input the text as COM …

---

## [State of IronRuby 10/19/07](https://www.ruby-forum.com/t/state-of-ironruby-10-19-07/117778)

<div class="topic-metadata">

**Author:** [@John\_LSSDLR](https://www.ruby-forum.com/u/John_LSSDLR)\
**Replies:** 0\
**Last updated:** [October 20, 2007, 2:29am UTC](https://www.ruby-forum.com/t/state-of-ironruby-10-19-07/117778 "2007-10-20T02:29:36Z")

</div>

NOTE: The SVN repository isn’t up to date with these changes. It will be sometime over the weekend. Thanks & happy reading, -John 286238: (dinov) Currently ngen will try and produce an image thatâ€™s probably around…

---

## [Why I can't update data, but I can insert data into new mode](https://www.ruby-forum.com/t/why-i-cant-update-data-but-i-can-insert-data-into-new-mode/117753)

<div class="topic-metadata">

**Author:** [@zlai](https://www.ruby-forum.com/u/zlai)\
**Replies:** 3\
**Last updated:** [October 20, 2007, 1:50am UTC](https://www.ruby-forum.com/t/why-i-cant-update-data-but-i-can-insert-data-into-new-mode/117753 "2007-10-20T01:50:27Z")

</div>

why I can’t update data, but I can insert data into new model. like this: if File.find\_by\_id(id) file=File.find\_by\_id(id) else file=File.new file.name=name file.save there is a problem, when there don’t find id, …

---

## [Debugging question](https://www.ruby-forum.com/t/debugging-question/117571)

<div class="topic-metadata">

**Author:** [@eggman2001](https://www.ruby-forum.com/u/eggman2001)\
**Replies:** 8\
**Last updated:** [October 20, 2007, 1:35am UTC](https://www.ruby-forum.com/t/debugging-question/117571 "2007-10-20T01:35:50Z")

</div>

I run this one gem with the command "foo ". I’d like to try to run it off the foo.rb file so that I can debug it. However, when I do "ruby path/to/foo.rb " it doesn’t behave in the same way as "foo ". How do I need to…

---

## [The difference between for-loop and each](https://www.ruby-forum.com/t/the-difference-between-for-loop-and-each/117746)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [October 20, 2007, 1:19am UTC](https://www.ruby-forum.com/t/the-difference-between-for-loop-and-each/117746 "2007-10-20T01:19:26Z")

</div>

Hopefully (I’m sure) somebody can shed a light on this. This caught me by surprise ruby 1.8.6 (2007-03-13 patchlevel 0) \[i686-linux\] test.rb: TEST = \[\] def procs &block TEST \<\< block end #for n in \[1,2,3\] do \[1,…

---

## [Puzzle...cleaner way to redefine a method?](https://www.ruby-forum.com/t/puzzle-cleaner-way-to-redefine-a-method/117743)

<div class="topic-metadata">

**Author:** [@blackie](https://www.ruby-forum.com/u/blackie)\
**Replies:** 4\
**Last updated:** [October 20, 2007, 1:01am UTC](https://www.ruby-forum.com/t/puzzle-cleaner-way-to-redefine-a-method/117743 "2007-10-20T01:01:15Z")

</div>

Here’s a puzzle. There must be a cleaner way to do this. I would like to have users of this class be able to call “set\_wrapper” and define pre and post behavior on the “working” method. The only simple way I’ve found …

---

## [Block composition?](https://www.ruby-forum.com/t/block-composition/117719)

<div class="topic-metadata">

**Author:** [@aaaaaa](https://www.ruby-forum.com/u/aaaaaa)\
**Replies:** 3\
**Last updated:** [October 20, 2007, 1:00am UTC](https://www.ruby-forum.com/t/block-composition/117719 "2007-10-20T01:00:05Z")

</div>

Hi, I’m implementing a plain simple search functionality over an array of objects. One of the attributes that those objects expose is a creation date (a Time object). The search functionality should work in 3 ways: s…

---

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

<div class="topic-metadata">

**Author:** [@Heruba](https://www.ruby-forum.com/u/Heruba)\
**Replies:** 0\
**Last updated:** [October 20, 2007, 12:41am UTC](https://www.ruby-forum.com/t/help/117766 "2007-10-20T00:41:22Z")

</div>

\#help help

---

## [Rocaml 0.6.0: fast, easy Ruby extensions in Objective Caml](https://www.ruby-forum.com/t/rocaml-0-6-0-fast-easy-ruby-extensions-in-objective-caml/117518)

<div class="topic-metadata">

**Author:** [@tulkas](https://www.ruby-forum.com/u/tulkas)\
**Replies:** 15\
**Last updated:** [October 19, 2007, 11:54pm UTC](https://www.ruby-forum.com/t/rocaml-0-6-0-fast-easy-ruby-extensions-in-objective-caml/117518 "2007-10-19T23:54:32Z")

</div>

rocaml allows you to write Ruby extensions in Objective Caml. http://eigenclass.org/hiki/rocaml Developing Ruby extensions with rocaml is easier and more convenient than writing a plain old C extension because rocaml…

---

## [2 dimensional array](https://www.ruby-forum.com/t/2-dimensional-array/117497)

<div class="topic-metadata">

**Author:** [@shuaib85](https://www.ruby-forum.com/u/shuaib85)\
**Replies:** 10\
**Last updated:** [October 19, 2007, 11:36pm UTC](https://www.ruby-forum.com/t/2-dimensional-array/117497 "2007-10-19T23:36:58Z")

</div>

Dear all I worked for quite some hours and i googled the two dimensional array in ruby and yet my problem is partially solved I want to declare 2-dimensional arrays it has 6 columns but uknow number of columns. i tr…

---

## [JRuby users out there?](https://www.ruby-forum.com/t/jruby-users-out-there/117758)

<div class="topic-metadata">

**Author:** [@headius](https://www.ruby-forum.com/u/headius)\
**Replies:** 1\
**Last updated:** [October 19, 2007, 11:33pm UTC](https://www.ruby-forum.com/t/jruby-users-out-there/117758 "2007-10-19T23:33:28Z")

</div>

Hey, we keep hearing about big and small organizations using JRuby, but it seems like a lot of them are either shy enough or busy enough that they don’t participate on the JRuby mailing lists or join us on IRC. If any…

---

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

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [October 19, 2007, 9:49pm UTC](https://www.ruby-forum.com/t/unsubscribe/117748 "2007-10-19T21:49:18Z")

</div>

unsubscribe

---

## [Compile 1.8.6-p110 under MinGW - test-all problems](https://www.ruby-forum.com/t/compile-1-8-6-p110-under-mingw-test-all-problems/115684)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 6\
**Last updated:** [October 19, 2007, 9:39pm UTC](https://www.ruby-forum.com/t/compile-1-8-6-p110-under-mingw-test-all-problems/115684 "2007-10-19T21:39:46Z")

</div>

Hello everybody, I’m trying to bring up to date the build of Ruby for MinGW. Part of this is that I found it performs better compiled with GCC than VC8 (Visual Studio 2005). http://pastie.caboo.se/pastes/95210 I don…

---

## [Extendig ruby: defining classes and creating objects from c](https://www.ruby-forum.com/t/extendig-ruby-defining-classes-and-creating-objects-from-c/117716)

<div class="topic-metadata">

**Author:** [@libit](https://www.ruby-forum.com/u/libit)\
**Replies:** 5\
**Last updated:** [October 19, 2007, 9:33pm UTC](https://www.ruby-forum.com/t/extendig-ruby-defining-classes-and-creating-objects-from-c/117716 "2007-10-19T21:33:31Z")

</div>

I can’t manage to define a new class (actually an exception) and then instantiating it from C. I define the class with: xr\_cException = rb\_define\_class\_under(xr\_module, “Exception”, rb\_eRuntimeError); rb\_define\_meth…

---

## [How exactly does Tryruby work?](https://www.ruby-forum.com/t/how-exactly-does-tryruby-work/117626)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 12\
**Last updated:** [October 19, 2007, 9:23pm UTC](https://www.ruby-forum.com/t/how-exactly-does-tryruby-work/117626 "2007-10-19T21:23:34Z")

</div>

Hi, I have always been curious: how does Tryruby (http:// tryruby.hobix.com/) work: does it contain a Ruby interpreter coded in Javascript, or is it just a frontend to some web service? PS I haven’t tried to reverse-…

---

## [Block iteration issues](https://www.ruby-forum.com/t/block-iteration-issues/117732)

<div class="topic-metadata">

**Author:** [@sabon](https://www.ruby-forum.com/u/sabon)\
**Replies:** 1\
**Last updated:** [October 19, 2007, 8:54pm UTC](https://www.ruby-forum.com/t/block-iteration-issues/117732 "2007-10-19T20:54:25Z")

</div>

Hello, I’m struggling with this stuff and can’t find an answer so please advise. What I’m trying to achieve @collection has 7 elements I want to: cycle through all those elements assign element\[“smth”\] through ele…

---

## [Q why do I get: uninitialized constant GLUT::BITMAP\_8\_BY\_13](https://www.ruby-forum.com/t/q-why-do-i-get-uninitialized-constant-glut-bitmap-8-by-13/117708)

<div class="topic-metadata">

**Author:** [@Steffen\_winther\_S](https://www.ruby-forum.com/u/Steffen_winther_S)\
**Replies:** 1\
**Last updated:** [October 19, 2007, 8:25pm UTC](https://www.ruby-forum.com/t/q-why-do-i-get-uninitialized-constant-glut-bitmap-8-by-13/117708 "2007-10-19T20:25:04Z")

</div>

Hi Doing a little open GL from Ruby fails on my production server (Ubuntu) but not on my labtop (Fedora) even though runby-opengl is installed without any complaints on both machines. On Ubuntu I get this error runni…

---

## [How to combine blocks and recursiveness](https://www.ruby-forum.com/t/how-to-combine-blocks-and-recursiveness/117529)

<div class="topic-metadata">

**Author:** [@luis](https://www.ruby-forum.com/u/luis)\
**Replies:** 8\
**Last updated:** [October 19, 2007, 7:31pm UTC](https://www.ruby-forum.com/t/how-to-combine-blocks-and-recursiveness/117529 "2007-10-19T19:31:44Z")

</div>

Hello, I am trying to code a method that accepts a block… easy. The problem is that this method is recursive, so I don’t know how to pass the block through the recursive calls. The specific code is about recurising t…

---

## [Rsruby with rails](https://www.ruby-forum.com/t/rsruby-with-rails/117730)

<div class="topic-metadata">

**Author:** [@zasf](https://www.ruby-forum.com/u/zasf)\
**Replies:** 0\
**Last updated:** [October 19, 2007, 7:25pm UTC](https://www.ruby-forum.com/t/rsruby-with-rails/117730 "2007-10-19T19:25:58Z")

</div>

Hi, I’d like to call R from a rails application. I already installed rsruby and works fine with irb, but how do I call it from rails? I have created config/evironments/rsruby\_environment.rb like so: require ‘rsruby’ …

---

## [State of IronRuby 10/5/07](https://www.ruby-forum.com/t/state-of-ironruby-10-5-07/116489)

<div class="topic-metadata">

**Author:** [@John\_LSSDLR](https://www.ruby-forum.com/u/John_LSSDLR)\
**Replies:** 5\
**Last updated:** [October 19, 2007, 6:54pm UTC](https://www.ruby-forum.com/t/state-of-ironruby-10-5-07/116489 "2007-10-19T18:54:53Z")

</div>

These are the IronRuby related check-ins that have happened the week of 10/5/07. Note that most of the work done this week is in DLR, since the team is heavily engaged in a refactoring pass across that codebase. 28335…

---

## [Comapring a systems local time with filetime](https://www.ruby-forum.com/t/comapring-a-systems-local-time-with-filetime/117712)

<div class="topic-metadata">

**Author:** [@glacius](https://www.ruby-forum.com/u/glacius)\
**Replies:** 0\
**Last updated:** [October 19, 2007, 4:56pm UTC](https://www.ruby-forum.com/t/comapring-a-systems-local-time-with-filetime/117712 "2007-10-19T16:56:14Z")

</div>

basically I have to compare the current system time to some filetime’s I have to only find files from the previous day (no further back than the previous day) can someone help me with the syntax

---

## [Complex views](https://www.ruby-forum.com/t/complex-views/117689)

<div class="topic-metadata">

**Author:** [@Daniel\_Khan](https://www.ruby-forum.com/u/Daniel_Khan)\
**Replies:** 2\
**Last updated:** [October 19, 2007, 3:05pm UTC](https://www.ruby-forum.com/t/complex-views/117689 "2007-10-19T15:05:50Z")

</div>

Hello, I am coming from seven years of php and I want to try rails now :slight\_smile: I started some approaches before and my biggest problem is that I don’t know the best practice for creating complex views with rail…

---

## [Listing files in remotely with net::ssh?](https://www.ruby-forum.com/t/listing-files-in-remotely-with-net-ssh/117642)

<div class="topic-metadata">

**Author:** [@glacius](https://www.ruby-forum.com/u/glacius)\
**Replies:** 1\
**Last updated:** [October 19, 2007, 2:27pm UTC](https://www.ruby-forum.com/t/listing-files-in-remotely-with-net-ssh/117642 "2007-10-19T14:27:45Z")

</div>

I want to connect to a remote server which I am able to do fine, I would like to specify a directory and list the contents. Anyone have any quick and simple solutions to do this or can point me in the direction of any…

---

## [Parse / write XML without changing character encoding](https://www.ruby-forum.com/t/parse-write-xml-without-changing-character-encoding/117696)

<div class="topic-metadata">

**Author:** [@helzer](https://www.ruby-forum.com/u/helzer)\
**Replies:** 0\
**Last updated:** [October 19, 2007, 2:21pm UTC](https://www.ruby-forum.com/t/parse-write-xml-without-changing-character-encoding/117696 "2007-10-19T14:21:19Z")

</div>

I need to change some things inside an XML document, so I’m reading it with REXML, changing the attributes I need and writing back. In the process I see that the character encoding changes all over. UTF-8 encoded cha…

---

## [Array help](https://www.ruby-forum.com/t/array-help/117638)

<div class="topic-metadata">

**Author:** [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Replies:** 9\
**Last updated:** [October 19, 2007, 1:03pm UTC](https://www.ruby-forum.com/t/array-help/117638 "2007-10-19T13:03:49Z")

</div>

I have \[1,2,3\] and I want to return \[1,2\] is there already a method that does this? irb(main):001:0\> \[1,2,3\] =\> \[1, 2, 3\] irb(main):002:0\> \[1,2,3\].pop =\> 3 irb(main):003:0\> \[1,2,3\].everything\_but\_the\_one\_thing\_that…

---

## [Is there any way to send a mail to using tk](https://www.ruby-forum.com/t/is-there-any-way-to-send-a-mail-to-using-tk/117681)

<div class="topic-metadata">

**Author:** [@vellingiri](https://www.ruby-forum.com/u/vellingiri)\
**Replies:** 1\
**Last updated:** [October 19, 2007, 10:53am UTC](https://www.ruby-forum.com/t/is-there-any-way-to-send-a-mail-to-using-tk/117681 "2007-10-19T10:53:19Z")

</div>

Dear frineds, Is there any way to send a mail using tk? Please could anybody help me. by vellingiri.

---

## [Anybody tell me about net/ftp protocol?](https://www.ruby-forum.com/t/anybody-tell-me-about-net-ftp-protocol/117676)

<div class="topic-metadata">

**Author:** [@vellingiri](https://www.ruby-forum.com/u/vellingiri)\
**Replies:** 2\
**Last updated:** [October 19, 2007, 9:40am UTC](https://www.ruby-forum.com/t/anybody-tell-me-about-net-ftp-protocol/117676 "2007-10-19T09:40:42Z")

</div>

Dear Friends, I am having the source code like this. require ‘net/ftp’ ftp = Net::FTP::new(“ftp.ruby-lang.org”) ftp.login(“anonymous”, “removed\_email\_address@domain.invalid”) ftp.chdir(“/pub/ruby”) tgz = ftp.list(“…

---

## [How do i even get started with ruby/tk](https://www.ruby-forum.com/t/how-do-i-even-get-started-with-ruby-tk/117662)

<div class="topic-metadata">

**Author:** [@shea](https://www.ruby-forum.com/u/shea)\
**Replies:** 1\
**Last updated:** [October 19, 2007, 6:38am UTC](https://www.ruby-forum.com/t/how-do-i-even-get-started-with-ruby-tk/117662 "2007-10-19T06:38:53Z")

</div>

I’ve been using ruby for about a two months now and have a decent understanding of ruby and rails, but I have no idea how even go about using tk. Is there any tutorials or articles any of you can refer me to? I did so…

---

## [Regexp.union](https://www.ruby-forum.com/t/regexp-union/117670)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [October 19, 2007, 5:47am UTC](https://www.ruby-forum.com/t/regexp-union/117670 "2007-10-19T05:47:27Z")

</div>

Regexp.union e$B$Ke(B shift\_jis e$B$Je(B 0xa1 e$B$9$J$o$Ae(B JIS X 0201 e$BJR2\>L\>$K$\*$1$k6hE@$H!"e(B ascii-8bit e$B$Je(B 0x80 e$B$9$J$o$AFf$N%P%$%J%j$Ne(B 0x80 e$B$rI=8=$9$k@55,I=8=$rM?$($k$H!"e(Bascii-8bit e$B$Je(B …

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

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