357202-376433 subjects 357621-386460

Noob: Review code for us of object orientation
357463 [lsumnler@gm ] Would appreciate is if someone could look over the attached file which
357486 [shortcutter@] I believe it looks pretty good already.  I think you have grokked OO

ruby to_i problem
357474 [phil@co pe k] I'm having an issue with a float being converted to an int,
+ 357476 [sutniuq@gm .] ruby -v: ruby 1.9.1p378 (2010-01-10 revision 26273) [x86_64-linux]
+ 357477 [ben@bl yt in] What You Think Is Happening Is Not What Is Actually Happening :)
+ 357478 [jgabrielygal] You are facing a problem about the inaccuracy inherent to floating
  357480 [phil@co pe k] thanks guys, this makes it clear

Tk on Windows and Mac OS X 10.6
357485 [echristopher] Is it possible to install Ruby Tk bindings on Windows with
357491 [albertschlef] The "Availability" section says you just have to install ActiveState's
+ 357492 [echristopher] I did install ActiveTcl on Windows, but afterwards "require 'tk'"
| 357496 [albertschlef] I vaginally remember having this problem. After I installed
| + 357497 [albertschlef] Wow. I intended to write "vaguely". I had some misspelling ("vagually"),
| + 357502 [echristopher] I just installed ActiveTcl, on my home machine this time, and I don't
|   357503 [albertschlef] I've just switched to my Windows box and tried to install Ruby + Tk.
|   + 357504 [albertschlef] It seems I've solved the mystery: "RubyInstaller" doesn't come with Tk
|   | 357506 [a99.googlegr] * TCL/TK installed (for example, from Active State)
|   + 357571 [nagai@ai ky ] I don't know about recent RubyInstallers.
|     357594 [a99.googlegr] In advance, I was unhappy to need to install TCL (~ 23 MB), but
|     357605 [nagai@ai ky ] On your environment only or machines under your control, it's no problem.
|     357608 [a99.googlegr] That's true. Would OCRA solve this problem?
|     357639 [nagai@ai ky ] Maybe. My plan is not only one. It's one of the solutions.
|     + 357662 [a99.googlegr] Great!
|     + 357674 [maurice.diam] Great, if it is possible, it would be *the* definitive solution for Tk
|     | + 357687 [saloution@go] ns
|     | | 357744 [maurice.diam] Great new, thank you for the link.
|     | + 357703 [rogerpack200] The only real cross platform distro I'm aware of is "rawr" for jruby.
|     |   357745 [maurice.diam] Not really, jruby (that I like) work on java which
|     |   357774 [nagai@ai ky ] Because I'm not familiar with FFI, I don't have good ideas to soleve
|     |   + 357800 [m.fellinger@] I've solved this by creating a separate thread that handles all calls
|     |   | 357813 [nagai@ai ky ] After calling Tk.mainloop, is the thread for Tk blocked from other
|     |   + 358237 [echristopher] s.com>
|     |     358291 [m.fellinger@] I actually just tested it on windows today, had to do some tweaks, but
|     + 357742 [a99.googlegr] One more thought, on my feeling from what I read in this newsgroup
|       + 357755 [rogerpack200] I've updated
|       | 357777 [a99.googlegr] I think, that's good.
|       + 357773 [nagai@ai ky ] Of course, if you can, it is the best way to install Tcl/Tk (and Ruby)
|       | 357778 [a99.googlegr] (3) Get the binaries in order to avoid compilation; becoming solved
|       | 357855 [rogerpack200] Feel free to hack on that wiki page if desired :)
|       | 357905 [a99.googlegr] Thank you, I'll do so - wait :)
|       | 358202 [a99.googlegr] Roger, could you send me your email address? Can't find it.
|       + 357793 [mark@ma kr s] Agreed.  I've tried to provide the step-by-steps in my Tk tutorial at
+ 357516 [rogerpack200] I've updated the windows section

Scruffy Graph is Cropped
357487 [alex.decaria] I'm running the Scruffy example for a line graph from
+ 375222 [matt@so nd n] Did you ever get to the bottom of this? I'm getting the exact same
| 375223 [astahl@hi .c] ...
+ 375227 [matt@so nd n] Don't think so, but thanks for the quick reply! Here's the original

ruby xml & Cdata
357489 [hakita@gm il] I try to make :    <id><![CDATA[1]]></id>
357490 [hakita@gm il] xml.id{  xml.cdata!(1)}

Convert Sequel Dataset to JSON Object
357493 [philsmithson] I'm trying to do an AJAX request from my xhtml page to a controller.
+ 357495 [philsmithson] json = Task.filter('id < ?', id).to_json
| 357569 [philsmithson] <code>
+ 357611 [code@je em e] FYI, a Sequel dataset is an abstract representation of an SQL query, it
  357643 [philsmithson] Task.all.to_json
  357646 [code@je em e] If your dataset is a model dataset, you probably don't want model
  357649 [philsmithson] That's brilliant thanks Jeremy, it's working now.
  357652 [code@je em e] You probably want to add Time#to_json to do something, maybe
  357665 [philsmithson] [{"country":"uk","task":"qwdwd","created_at":{"json_class":"Time","n":407000000,"s":1266543411},"id":3}]
  357667 [code@je em e] class Time
  357668 [philsmithson] hehe thanks and yes I am ! :)

Running both Ruby 1.8 and 1.9 on same windows machine
357498 [alex.decaria] I want to try out Ruby 1.9, but don't want to go whole hog since I have
+ 357501 [mo_mail@on h] When I asked a very similar question, the response I got from Phillip
+ 357508 [luislavena@g] On Feb 17, 4:17=A0am, Alex DeCaria <alex.deca...@millersville.edu>
  357514 [alex.decaria] As far as installing and updating Ruby gems for the 1.9 version, if I do
  + 357515 [shevegen@li ] Is there an .exe file for 1.9 ?
  | 357558 [luislavena@g] By exe you mean installer?
  + 357525 [cremes.devli] Yes, that is the case. I run both 1.8.6 and 1.9.1 on my Windows boxes with completely separate gem installations. I did not have to do any extra work to accomplish this. The rubyinstallers are really great!

Re: moving from ruby ee 1.8.6 to 1.8.7 (ee)
357499 [alex.decaria] You could copy the gems directory from your 1.8.6 installation to the
+ 357500 [jonathan@jm ] Any gems that require native extensions will probably not work just by
+ 357509 [luislavena@g] On Feb 17, 4:20=A0am, Alex DeCaria <alex.deca...@millersville.edu>

Unable to run .rb file with SCITE editor
357505 [sanjeev.oza@] I have re-installed Ruby on my pc and run some rb files but these files
357517 [rogerpack200] try reinstalling, and/or right click on them -> "open wish", choose
357522 [sanjeev.oza@] Thanks Roger for your comments,
+ 357523 [chris.hulan@] SOunds like the new install didn't add your ruby bin dir to the path
+ 357524 [sutniuq@gm .] I suppose your script directory path or the script name itself contains
  357526 [sanjeev.oza@] I updated Ruby properties file in "C:\ruby\scite" as per your above
  357527 [sutniuq@gm .] You've to restart SciTE afterwards.
  357588 [rogerpack200] ruby.exe is most likely not in your path then.  Reinstall ruby and
  357677 [sanjeev.oza@] Thanks Roger,

%%% top 10 Lovely place for Lovers  %%%%
357507 [malathi1104@] %%% top 10 Lovely place for Lovers  %%%%

Ruby & XML
357513 [hakita@gm il] xml {} produce carriage return
357519 [rogerpack200] .strip?
357520 [hakita@gm il] Thanks but no,

Ruby 1.9 and RMagick
357530 [alex.decaria] The only application keeping me from going completely to Ruby 1.9 (from
357538 [rogerpack200] source is the only way.

Re: Tk on Windows and Mac OS X 10.6 (ffi-tk ?)
357531 [maurice.diam] On 16 f=E9v, 22:33, Eric Christopherson <echristopher...@gmail.com>

lookup up documentation for inherited methods
357532 [nick@ni k- r] I find it frustrating when using "ri" to look up documentation on a
+ 357535 [marnen@ma ne] I usually find rdoc (as available at railsapi.com or ruby-doc.org) to be
+ 357536 [sutniuq@gm .] Maybe you can't find the grep method in String, because it hasn't such a
| 357543 [shortcutter@] ar
| 357550 [nick@ni k- r] method?
+ 357540 [rogerpack200] Hmm.  There is a little utility I use within irb (for me it's easier
+ 357557 [albertschlef] So use FastRI instead of RI. It knows to look in the ancestors.

system waiting for launched process AND forked processes
357537 [pmorel@gm il] We have written a small client-server program in c/socket. To launch the
+ 357541 [rogerpack200] Mine doesn't seem to do that.
| 357544 [shortcutter@] What do you create the thread for?  Also exec is probably a better
| 357552 [rogerpack200] ahh yes exec would work well.
+ 357542 [shortcutter@] Hmmm, might be that you have an issue because your child's child is
  357561 [pmorel@gm il] I didn't take any measure to daemonize  the child... Now I have done it

Great Lakes Ruby Bash - Call for Proposals
357545 [brandon.dimc] We are pleased to announce that we are accepting talk proposals for the =

357547 [manishbelsar] I m working on a rails proj..
+ 357549 [sophrinix@gm] unless the author does something non standard it should be
+ 357553 [marnen@ma ne] I doubt that you are.  That version number doesn't seem familiar.
  357565 [sophrinix@gm] probably means rails.
  357590 [manishbelsar] Sir can will_paginate work in RubyGems version 1.3.5????
  357598 [aldric@tr vo] What you are looking for is mislav_will-paginate.

Where is Ruby 1.9 'TK' library?
357548 [alex.decaria] Just installed Ruby 1.9 and tried to run one of my TK applications that
+ 357551 [echristopher] See the recent (within the past two days) threads about Tk here. It
+ 357559 [luislavena@g] On Feb 17, 7:36=A0pm, Alex DeCaria <alex.deca...@millersville.edu>
  357567 [echristopher] by
  357570 [rogerpack200] Funny you ask.
  + 357572 [echristopher] Wow, nice! Only... how do I compile the extension to take its Tcl/Tk
  | 357573 [rogerpack200] Did you add the bin dir into your path?
  | + 357591 [echristopher] Yes. Still no luck. I also tried using both MSys and cmd.exe. This was
  | | 357592 [rogerpack200] Hangs with tk for me have typically historically meant that Tk wasn't
  | | 357711 [echristopher] It did find Tk and used it to compile the extension; and things seem
  | | 357713 [alex.decaria] I got an interesting result.  I was able to install tk_from_gem and it
  | | 357720 [rogerpack200] Interesting.  I get the same thing with tk_as_gem (and approximately the
  | + 357725 [echristopher] Roger, could you give some more guidance on what gem/extconf switches
  |   357733 [rogerpack200] Looks like I was hard coding it to /Tcl (my bad).
  |   357970 [echristopher] I've finally had success installing tk_as_gem on my home Windows VM
  + 357577 [alex.decaria] I tried:  'gem install tk_as_gem' but get the error message
    357583 [rogerpack200] My first guess is that you don't have the devkit installed (if gcc
    358598 [alex.decaria] Roger,
    358659 [rogerpack200] What's the full output? Do you have 32 bit versions of tk and ruby
    358666 [alex.decaria] I have ActiveState Active Tcl8.4.19.1 installed, along with Ruby
    358744 [rogerpack200] What happens if you try and run ruby extconf.rb?
    + 358915 [alex.decaria] I'm away from my system this week.  When I return I'll try running ruby
    + 359084 [alex.decaria] checking for ruby_native_thread_p() in ruby.h... yes
      359105 [rogerpack200] And then when you run make?
      359128 [alex.decaria] gcc -shared -s -o tcltklib.so stubs.o tcltklib.o -L. -LC:/Ruby19/lib
      359139 [rogerpack200] that it odd it should be creating several .so files
      359151 [alex.decaria] If I search my entire C: drive for tkutil.so it finds a copy in my old
      359165 [rogerpack200] That's the built-in one, I think, not the gem one...and this is after a
      359177 [alex.decaria] That worked!  I copied the entire tk_as_gem-0.1.0 directory from my 32
      359235 [rogerpack200] I think it will work with 8.5
      359247 [nagai@ai ky ] I've had a trouble on extremely slow loading Ruby1.9/Tk on my linux box.

CSV: what is the problem ?
357556 [francois.boo] Do you have any solution?
357560 [james@gr ys ] It means that in Ruby 1.9 the old CSV library was replaced by the =
357562 [francois.boo] Ok, I did not understand something!.
357564 [james@gr ys ] $ echo '1;2;3' > data.csv
357566 [francois.boo] Yes, it works ! :)

rubyful_soup.rb - error and warning message
357575 [lathty@gm il] $ cat kitty.rb
357582 [tony@me io .] Rubyful Soup is a name I have not heard of since about 2006.  If you go to
357585 [lathty@gm il] Thank you for your advise. I will try nokogiri.

Exception change with net/http in Ruby 187 PL 248/9
357576 [mitch@so ia ] Ran into the following problem with net http in Ruby 187 pl248
357604 [gethemant@gm] he
357613 [mitch@so ia ] Thanks for taking the time to respond Hemant.

simple addition program, need help
357578 [spencaatee@l] class Calculater
+ 357579 [alex.decaria] The variable number is different than the variable @@number.  number is
| + 357580 [alex.decaria] An additional thing to keep in mind.  gets returns the input as a
| + 357581 [spencaatee@l] ah thank you, not totally sure why I made number a class variable. So
|   357593 [jgabrielygal] That's because gets returns a string, and the + method of string
+ 357584 [glenn_ritz@y] ...

Is it possible to run rb file on safari browser in windowsXP
357586 [sanjeev.oza@] I wanted to run my .rb file in Safari browser in Windows XP OS. Is it

Is there anyway to On/Off mailer funtionality?
357587 [saravani20@g] I'm using actionmailer to send emails from my application(25 - 30 types
357589 [saravani20@g] I got it...

FXRuby and Ruby 1.9
357595 [alex.decaria] Forgive the post to this forum.  The FXRuby forum doesn't seem to be
+ 357596 [alex.decaria] It does appear to be related to the OS, since the same script works fine
+ 357601 [lyle@ly ej h] Not sure what forum you're talking about, but as noted on the FXRuby
  + 357606 [alex.decaria] Thanks Lyle - I was talking about the FXRuby Forum list on this site
  + 358238 [alex.decaria] Lyle,

[ANN] Money 2.2.0
357597 [semmons99@gm] Money 2.2.0 has been released.

Method prototypes like C++? // Compiling executables
357599 [ferdil.kiwi@] 1. How come there isn't any "method prototype" feature like the function
357602 [Rob@Ag le on] Sure just do it!  Methods only need to exist when then are "called"
+ 357603 [sandeepbupat] how to unsubscribe from this mailing list can any one please reply me.
+ 357614 [ferdil.kiwi@] Wait, I explain my problem.
  + 357615 [jgabrielygal] What Rob wanted to say is that you don't need to declare a function
  + 357676 [shortcutter@] You need that in C / C++ only because implementations are split to

ruby-prof on windows: strange measured time numbers
357600 [ztuaev@si an] I play with ruby-prof. Profiling those simple-few-dozens-line scripts
357612 [rogerpack200] which version of ruby-prof? (RUBY_PROF_CPU_FREQUENCY only helps with
357616 [ztuaev@si an] ruby-prof-0.7.3-x86-mswin32-60
+ 357619 [rogerpack200] I'll try and build a native gem for mswin32 and you can try that.
+ 357633 [rogerpack200] All righty update your gem, give 'er a shot again and report back.
  357672 [ztuaev@si an] updated gem and made two series of shots with the same two
  357696 [rogerpack200] Note well that it won't actually use RUBY_PROF_CPU_FREQUENCY unless you
  357702 [ztuaev@si an] Roger,

Help  :  Error in scrubyt
357607 [treep_ir@ya ] i have one problem

strings combine
357617 [rogerpack200] Shouldn't the following be a syntax error?
357618 [gwtmp01@ma .] Rarely seen, but string literal "implicit" concatenation has always been =
+ 357635 [tony@me io .] I remember at one point I tried Python-style triple quotes, all "cool, Ruby
+ 357637 [rogerpack200] Yeah--for me it has almost always represented a bug (like a missing ,
  357658 [shortcutter@] I can't remember having used it but it can be useful if you want to
  357681 [raul.c.jara@] 'hi ' 'there'
  357683 [shortcutter@] Not for me.  The concatenation is done at parse time.  Your
  + 357688 [botpena@gm i] as long as it's quoted string literal,
  + 357697 [raul.c.jara@] I guess I find it counter intuitive to have such different behaviors
    357707 [shortcutter@] Why?  Parsing and executing are two fundamentally different things.
    357716 [raul.c.jara@] I think you misunderstand what I was saying.  I was not asking what the
    + 357718 [rogerpack200] Yeah it ends up being pretty hard to generate a parser that will do
    | 357724 [raul.c.jara@] I'm not sure why, though.  The parser is able to turn
    | + 357726 [justincollin] Because
    | | + 357732 [shortcutter@] Exactly my point.
    | | + 357734 [raul.c.jara@] But the parser knows what's a method and what's a variable, right? (I'm
    | |   357738 [rick.denatal] No.
    | |   + 357740 [perrin@ap th] I think this is really the key here.  With this code, we have two literal
    | |   + 357746 [b.candler@po] irb(main):001:0> x y
    | |     357752 [raul.c.jara@] Ahhh.  I had assumed that the ruby parser kept a running list of defined
    | |     357789 [b.candler@po] Defined local variables, yes. Defined methods, no. Methods can be
    | + 357728 [eregontp@gm ] +1, it should at least raise a warning. I never saw any use case of this.
    + 357757 [albertschlef] s = '"' "ab'cd" '"'
      357781 [botpena@gm i] it's a feature, so that it would be easier to the eye.