# Ruby

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

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

---

## [Truncate trouble](https://www.ruby-forum.com/t/truncate-trouble/89353)

<div class="topic-metadata">

**Author:** [@russianbandit](https://www.ruby-forum.com/u/russianbandit)\
**Replies:** 3\
**Last updated:** [March 19, 2007, 10:41pm UTC](https://www.ruby-forum.com/t/truncate-trouble/89353 "2007-03-19T22:41:30Z")

</div>

This (‘40.12’.to\_f\*100).to\_i results in this integer : 4011 This is a bit of surprise. I’m using 1.8.4 on windows. Is this a bug? Is there another floating type that avoids this problem? I;m not seeing anything in …

---

## [Gtk Wait Cursor](https://www.ruby-forum.com/t/gtk-wait-cursor/89307)

<div class="topic-metadata">

**Author:** [@WoodHacker](https://www.ruby-forum.com/u/WoodHacker)\
**Replies:** 2\
**Last updated:** [March 19, 2007, 9:30pm UTC](https://www.ruby-forum.com/t/gtk-wait-cursor/89307 "2007-03-19T21:30:57Z")

</div>

Can anyone explain how to create a Wait Cursor in Gtk? I can’t seem to find an example and the docs are not clear. Thanks

---

## [Readlines help](https://www.ruby-forum.com/t/readlines-help/89208)

<div class="topic-metadata">

**Author:** [@Bucco](https://www.ruby-forum.com/u/Bucco)\
**Replies:** 1\
**Last updated:** [March 19, 2007, 7:04pm UTC](https://www.ruby-forum.com/t/readlines-help/89208 "2007-03-19T19:04:15Z")

</div>

I am using the latest version of Ruby on Windows. When I do the following in irb: File.open(‘sometextfile.txt’).readlines I get an array of unicode characters. The example in the book I am following along with, Eve…

---

## [Possible bug in rb\_detach\_process()](https://www.ruby-forum.com/t/possible-bug-in-rb-detach-process/89111)

<div class="topic-metadata">

**Author:** [@kubo](https://www.ruby-forum.com/u/kubo)\
**Replies:** 1\
**Last updated:** [March 19, 2007, 5:53pm UTC](https://www.ruby-forum.com/t/possible-bug-in-rb-detach-process/89111 "2007-03-19T17:53:27Z")

</div>

e$B5WJ\]$G$9!#e(B waitpid e$B4X78$G$A$i$\[$i%=!\<%9$r8+$F$$$?$N$G$9$,!"0J2\<$NItJ,$OLdBj$G$O$Je(B e$B$$$G$7$g$&$+!)e(B static VALUE detach\_process\_watcher(int \*pid\_p) { rb\_pid\_t cpid; int status; for (;;) { cpid…

---

## [\[ ruby-Bugs-9360 \] Matrix inverse problem](https://www.ruby-forum.com/t/ruby-bugs-9360-matrix-inverse-problem/89268)

<div class="topic-metadata">

**Author:** [@Yukihiro\_M](https://www.ruby-forum.com/u/Yukihiro_M)\
**Replies:** 3\
**Last updated:** [March 19, 2007, 5:29pm UTC](https://www.ruby-forum.com/t/ruby-bugs-9360-matrix-inverse-problem/89268 "2007-03-19T17:29:24Z")

</div>

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B rubyforgee$B%P%0%l%\]!\<%H$K0J2\<$N$h$&$J%l%\]!\<%H$,Mh$F$^$9$,!";de(B e$B$K$OH=CG$G$-$^$;$s!#$I$&$G$7$g$&!#@PDM$5$s!)e(B e$B%3%a%s%H$OJT=8$7$F$"$j$^$9!#%Q%C%A$Oe(B(3e$B$D$"$ke(B)e$B:G=\*H…

---

## [GUI With Ruby](https://www.ruby-forum.com/t/gui-with-ruby/88367)

<div class="topic-metadata">

**Author:** [@Yannick\_G](https://www.ruby-forum.com/u/Yannick_G)\
**Replies:** 106\
**Last updated:** [March 19, 2007, 4:37pm UTC](https://www.ruby-forum.com/t/gui-with-ruby/88367 "2007-03-19T16:37:25Z")

</div>

Just a quick question: I’m sick of using Command Prompt for my little Ruby programs, and I was wondering what can get me started? I know that I can use Tk, but that isn’t very well documented in the Pickaxe. Thanks!

---

## [Ruby-sdl: How do you poll events?](https://www.ruby-forum.com/t/ruby-sdl-how-do-you-poll-events/89203)

<div class="topic-metadata">

**Author:** [@ChrisKaelin](https://www.ruby-forum.com/u/ChrisKaelin)\
**Replies:** 7\
**Last updated:** [March 19, 2007, 4:31pm UTC](https://www.ruby-forum.com/t/ruby-sdl-how-do-you-poll-events/89203 "2007-03-19T16:31:23Z")

</div>

The code of my raw main loop is below. I’m sure there are better ways to poll the event queue. Do you have better ideas? Also I’m not sure about the garbage collect thing at the bottom… loop { offset\_x = 0 offset\_y …

---

## [Open-uri can read slashdot rss, but not digg rss?](https://www.ruby-forum.com/t/open-uri-can-read-slashdot-rss-but-not-digg-rss/89223)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [March 19, 2007, 3:44pm UTC](https://www.ruby-forum.com/t/open-uri-can-read-slashdot-rss-but-not-digg-rss/89223 "2007-03-19T15:44:26Z")

</div>

Here’s an irb session, this used to work, maybe something new about digg’s rss feed ? irb(main):001:0\> require ‘open-uri’ =\> true irb(main):002:0\> open(‘Slashdot slashdot’).readlines.length =\> 263 irb(main):003:0\> …

---

## [Beginner learning Object in Ruby](https://www.ruby-forum.com/t/beginner-learning-object-in-ruby/89084)

<div class="topic-metadata">

**Author:** [@ct2005](https://www.ruby-forum.com/u/ct2005)\
**Replies:** 8\
**Last updated:** [March 19, 2007, 3:32pm UTC](https://www.ruby-forum.com/t/beginner-learning-object-in-ruby/89084 "2007-03-19T15:32:24Z")

</div>

I am new to object-oriented programming and Ruby. Although I learn some simple programming before e.g. cobol, pascal, but I know very little in the area of programming, especially OO concept. A few years back, I tried…

---

## [Ruby and Mobile](https://www.ruby-forum.com/t/ruby-and-mobile/89182)

<div class="topic-metadata">

**Author:** [@SunRaySon](https://www.ruby-forum.com/u/SunRaySon)\
**Replies:** 5\
**Last updated:** [March 19, 2007, 3:18pm UTC](https://www.ruby-forum.com/t/ruby-and-mobile/89182 "2007-03-19T15:18:15Z")

</div>

Are there any ruby applications that are written for mobile devices and is there any good framework that helps in developing applications for mobile devices. Kiran K.

---

## [Documentation for Socket is not there!](https://www.ruby-forum.com/t/documentation-for-socket-is-not-there/89311)

<div class="topic-metadata">

**Author:** [@sai438](https://www.ruby-forum.com/u/sai438)\
**Replies:** 5\
**Last updated:** [March 19, 2007, 3:16pm UTC](https://www.ruby-forum.com/t/documentation-for-socket-is-not-there/89311 "2007-03-19T15:16:15Z")

</div>

I am unable to view the documentation for Socket related APIs. can any help me out of this??

---

## [Computing average of time deltas](https://www.ruby-forum.com/t/computing-average-of-time-deltas/89306)

<div class="topic-metadata">

**Author:** [@splattael](https://www.ruby-forum.com/u/splattael)\
**Replies:** 1\
**Last updated:** [March 19, 2007, 2:56pm UTC](https://www.ruby-forum.com/t/computing-average-of-time-deltas/89306 "2007-03-19T14:56:11Z")

</div>

Hello, Just to make sure I am not reinventing the wheel™ again: is there a function/lib in Ruby which computes average of timespans? e.g. first task took 1s:100ms second task took 1s:400ms third task took 3s…

---

## [Generating OOo-Calc charts with Ruby](https://www.ruby-forum.com/t/generating-ooo-calc-charts-with-ruby/89305)

<div class="topic-metadata">

**Author:** [@apanloco](https://www.ruby-forum.com/u/apanloco)\
**Replies:** 1\
**Last updated:** [March 19, 2007, 2:53pm UTC](https://www.ruby-forum.com/t/generating-ooo-calc-charts-with-ruby/89305 "2007-03-19T14:53:10Z")

</div>

For a while I have been using Ruby to generate charts in Excel through WIN32OLE, i.e. require ‘win32ole’. I am now wondering if something similar can be achieved using OpenOffice.org Calc and Ruby. I can’t find anythi…

---

## [KDE Ruby SOC projects](https://www.ruby-forum.com/t/kde-ruby-soc-projects/89261)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [March 19, 2007, 2:22pm UTC](https://www.ruby-forum.com/t/kde-ruby-soc-projects/89261 "2007-03-19T14:22:47Z")

</div>

The KDE project has been approved for Google’s Summer of Code project with an unlimited number of possible projects subject to project quality and suitable mentors. Alexander Dymo has proposed ‘Implement foundations f…

---

## [How to make webpage?](https://www.ruby-forum.com/t/how-to-make-webpage/89206)

<div class="topic-metadata">

**Author:** [@nikunjgupta1](https://www.ruby-forum.com/u/nikunjgupta1)\
**Replies:** 7\
**Last updated:** [March 19, 2007, 2:20pm UTC](https://www.ruby-forum.com/t/how-to-make-webpage/89206 "2007-03-19T14:20:45Z")

</div>

Hi, I am new to Ruby and want to make 3 static web pages, which has basic menus “users, Roles and permissions”. users information should consists of “Login, First name, Last name and email”. list should show only 10 …

---

## [PLEAC - Programming Language Examples Alike Cookbook](https://www.ruby-forum.com/t/pleac-programming-language-examples-alike-cookbook/89210)

<div class="topic-metadata">

**Author:** [@nando](https://www.ruby-forum.com/u/nando)\
**Replies:** 5\
**Last updated:** [March 19, 2007, 2:11pm UTC](https://www.ruby-forum.com/t/pleac-programming-language-examples-alike-cookbook/89210 "2007-03-19T14:11:40Z")

</div>

Hi! I’ve been researching about dynamic languages and a couple of weeks ago I decided that Ruby is the best… I guess most of you guys will agree :slight\_smile: Well, one of the pages I found is http://pleac.sourceforge…

---

## [Attribute Ordering in REXML](https://www.ruby-forum.com/t/attribute-ordering-in-rexml/89298)

<div class="topic-metadata">

**Author:** [@caritos](https://www.ruby-forum.com/u/caritos)\
**Replies:** 2\
**Last updated:** [March 19, 2007, 1:04pm UTC](https://www.ruby-forum.com/t/attribute-ordering-in-rexml/89298 "2007-03-19T13:04:42Z")

</div>

Is there any way of specify the order of the attributes in REXML. I can’t find any way of doing this in the documentation. The two methods that I found “add\_attribute(key, value=nil)” and “add\_attributes(hash)” provi…

---

## [Update a field using ajax](https://www.ruby-forum.com/t/update-a-field-using-ajax/89304)

<div class="topic-metadata">

**Author:** [@saravanan](https://www.ruby-forum.com/u/saravanan)\
**Replies:** 0\
**Last updated:** [March 19, 2007, 12:57pm UTC](https://www.ruby-forum.com/t/update-a-field-using-ajax/89304 "2007-03-19T12:57:17Z")

</div>

Hi, Am having a user profile editing page. Right now, it is posting request in general. But, i want to do it with ajax. Please any body, help me to change it to ajax. Thanks.

---

## [Strlcpy and strlcat](https://www.ruby-forum.com/t/strlcpy-and-strlcat/89280)

<div class="topic-metadata">

**Author:** [@U.Nakamura](https://www.ruby-forum.com/u/U.Nakamura)\
**Replies:** 2\
**Last updated:** [March 19, 2007, 11:14am UTC](https://www.ruby-forum.com/t/strlcpy-and-strlcat/89280 "2007-03-19T11:14:29Z")

</div>

e$B$3$s$K$A$O!"$J$+$\`$ie(B(e$B$&e(B)e$B$G$9!#e(B e$B$7$P$i$/A0$NLZB\<$5$s$NF|5-e(B\[1\](e$B$G$$$$$N$+$Je(B)e$B$r8+$F;W$&$H$3$me(B e$B$,$“$C$?$N$G!”$H$j$"$($:A0=\`Hw$H$7$Fe(Bstrlcpye$B$$h$Se(Bstrlcate$B$NB8e(B e$B:$r3NG’$7…

---

## [Attr\_accessor](https://www.ruby-forum.com/t/attr-accessor/89127)

<div class="topic-metadata">

**Author:** [@ckonrad](https://www.ruby-forum.com/u/ckonrad)\
**Replies:** 11\
**Last updated:** [March 19, 2007, 11:01am UTC](https://www.ruby-forum.com/t/attr-accessor/89127 "2007-03-19T11:01:28Z")

</div>

wow this attr\_accessor thing is really great i can see this saving ALOT of typing.

---

## [Stdout flush in fork](https://www.ruby-forum.com/t/stdout-flush-in-fork/89091)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 8\
**Last updated:** [March 19, 2007, 7:27am UTC](https://www.ruby-forum.com/t/stdout-flush-in-fork/89091 "2007-03-19T07:27:01Z")

</div>

e$B$1$$$8$e!w$$$7$D$+$G$9e(B. ruby trunk e$B$G$N$O$J$7$G$9$,e(B, fork e$B$9$k$H$-$Ke(B STDOUTe$B$He(BSTDERRe$B$re(Bflush e$B$9$k$H$"$j$^$9$,e(B, rb\_fork e$B$r$$F$$k$He(B, flush e$B$7$F$+$ie(B forke$B$9$k$^$G$N4V$KB\>$…

---

## [At\_exit](https://www.ruby-forum.com/t/at-exit/89267)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [March 19, 2007, 6:10am UTC](https://www.ruby-forum.com/t/at-exit/89267 "2007-03-19T06:10:57Z")

</div>

e$B$1$$$8$e!w$$$7$D$+$G$9e(B. at\_exite$B$G$9$,e(B, http://www.ruby-lang.org/ja/man/?cmd=view;name=��λ���� e$B$K=q$$$F$"$k=gHV$G\<B9T$5$l$F$$$J$$5$$,$7$^$9e(B(ThreadKille$B$NA0$K$J$C$F$$e(B e$B$ke(B). ruby-1.8.6 ruby-1…

---

## [Ruby-Glib2 Documentation](https://www.ruby-forum.com/t/ruby-glib2-documentation/89214)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 2\
**Last updated:** [March 19, 2007, 2:39am UTC](https://www.ruby-forum.com/t/ruby-glib2-documentation/89214 "2007-03-19T02:39:41Z")

</div>

Does anyone know where the Ruby-Glib2 Documentation can be downloaded? I like having my documentation local where possible.

---

## [Problem trying to use varargs in private function within C e](https://www.ruby-forum.com/t/problem-trying-to-use-varargs-in-private-function-within-c-e/89201)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 4\
**Last updated:** [March 19, 2007, 1:15am UTC](https://www.ruby-forum.com/t/problem-trying-to-use-varargs-in-private-function-within-c-e/89201 "2007-03-19T01:15:36Z")

</div>

Hi all, Ruby 1.8.6 Windows XP VC++ 8 This simple C extension complains of “too few arguments for call” when I try to build it. Yet, within a standalone C program it works fine. Am I forced to use varargs.h instead …

---

## [Dl when $SAFE = 1](https://www.ruby-forum.com/t/dl-when-safe-1/89176)

<div class="topic-metadata">

**Author:** [@sheepman](https://www.ruby-forum.com/u/sheepman)\
**Replies:** 2\
**Last updated:** [March 19, 2007, 12:43am UTC](https://www.ruby-forum.com/t/dl-when-safe-1/89176 "2007-03-19T00:43:34Z")

</div>

ã“ã‚“ã«ã¡ã¯ã€sheepman ã§ã™ã€‚ $SAFE=1ã®ã¨ãã® dl ãƒ©ã‚¤ãƒ–ãƒ©ãƒªã®æŒ¯ã‚‹èˆžã„ã«é–¢ã—ã¦ã§ã™ã€‚ require ‘dl’ $SAFE = 1 h = DL.dlopen(nil) sys = h.sym(‘system’, ‘IP’) uname = ‘uname -rs’.taint sys\[u…

---

## [Rails mailing list . .](https://www.ruby-forum.com/t/rails-mailing-list/89233)

<div class="topic-metadata">

**Author:** [@cpeterson](https://www.ruby-forum.com/u/cpeterson)\
**Replies:** 3\
**Last updated:** [March 19, 2007, 12:06am UTC](https://www.ruby-forum.com/t/rails-mailing-list/89233 "2007-03-19T00:06:31Z")

</div>

I’ve finally decided I might want to sign up on the Rails list. Unfortunately, I don’t remember where it’s located. A URL in response to this would be muchly appreciated.

---

## [Beginning question. modules + object creation](https://www.ruby-forum.com/t/beginning-question-modules-object-creation/89232)

<div class="topic-metadata">

**Author:** [@ckonrad](https://www.ruby-forum.com/u/ckonrad)\
**Replies:** 2\
**Last updated:** [March 18, 2007, 11:58pm UTC](https://www.ruby-forum.com/t/beginning-question-modules-object-creation/89232 "2007-03-18T23:58:30Z")

</div>

I was wondering if i create a modules file called mathematics.rb: module Mathematics class Add def add(operand\_one, operand\_two) return operand\_one + operand\_two end end#end class end and then i create another fi…

---

## [Executables and Standard Input](https://www.ruby-forum.com/t/executables-and-standard-input/89228)

<div class="topic-metadata">

**Author:** [@brandon](https://www.ruby-forum.com/u/brandon)\
**Replies:** 0\
**Last updated:** [March 18, 2007, 10:52pm UTC](https://www.ruby-forum.com/t/executables-and-standard-input/89228 "2007-03-18T22:52:50Z")

</div>

Hello, I need to start an executable and feed it data through standard input. I know how to do this with other languages but can’t figure out how to do it with ruby. Can someone please point me in the right direction…

---

## [Accessing methods from the blocks caller](https://www.ruby-forum.com/t/accessing-methods-from-the-blocks-caller/89175)

<div class="topic-metadata">

**Author:** [@andrew](https://www.ruby-forum.com/u/andrew)\
**Replies:** 7\
**Last updated:** [March 18, 2007, 9:57pm UTC](https://www.ruby-forum.com/t/accessing-methods-from-the-blocks-caller/89175 "2007-03-18T21:57:17Z")

</div>

Hello, Sorry if this has been asked many times before, but I’m having a hard time finding the right keywords to search for this one. Here’s my question… if I have a method that accepts a block and I want to call a …

---

## [LittleCoder](https://www.ruby-forum.com/t/littlecoder/89184)

<div class="topic-metadata">

**Author:** [@Harold\_H](https://www.ruby-forum.com/u/Harold_H)\
**Replies:** 1\
**Last updated:** [March 18, 2007, 6:26pm UTC](https://www.ruby-forum.com/t/littlecoder/89184 "2007-03-18T18:26:54Z")

</div>

Hello all, http://www.danceliquid.com/LittleCoder/ What is it? LittleCoder is essentially a Ruby interpreter bolted on to DirectX. It hopes to be a fun and easy way to do simple graphics on Windows for kids of all a…

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

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