236301-237226

236156-238155 subjects 236542-239799

^ problem with base64 decode
236301 [alexander fo] i having a small problem with base64 decoding a string.

^ Process POST data
236321 [alinutzzu ya] Recently, I had one little problem regarding Ruby and Processing POST
236394 [parragh dayk] The easy way is to make a new CGI object in your script, that mod_ruby
236409 [alinutzzu ya] Thanks Parragh,

^ script with -e command line option???
236322 [sunadrad yah] If I type in the following example from "Programming Ruby", I get an
236323 [wonado donne] My answer is from Windows 2000, Ruby 1.8.5, but the reason may be, that there is
+ 236324 [Rob AgileCon] $ ruby -n -e "print if /wombat/" *.txt
+ 236325 [sunadrad yah] no, that's not my problem.  oh - but this reminds me that if i just use
  + 236327 [Rob AgileCon] Well, the first thing to try is changing the kind of quotes.
  | 236454 [sunadrad yah] Turns out that this was indeed the problem.  When I started using the
  | + 236458 [ljz asfast.c] #!/bin/bash
  | + 236543 [shortcutter ] exec /usr/bin/ruby1.8 "$@"
  + 236328 [shortcutter ] This looks like "ruby" was a shell script that does not properly quote
  + 236429 [brucej03 com] On Friday 26 January 2007 17:08, Suresh Unadrad <Suresh Unadrad

^ RubyGems 0.9.1 calling a gem with gem '<gem>'
236329 [austin7873 g] irb(main):001:0> require 'rubygems'
+ 236332 [rimantas gma] require 'rubygems'
| 236334 [austin7873 g] I was using: gem 'uuid'
| 236338 [rimantas gma] It depends :) 'gem' tells your program that you are going to use some
| 236340 [austin7873 g] Thanks Rimantas, you've been super helpfull.  looks like autorequire in
+ 236476 [drbrain segm] This is expected, you haven't required 'uuid' yet.

^ pass by reference?
236333 [andy.koch pc] Is there a way to pass variables by reference into function.
+ 236335 [vincent.four] You don't actually need to do anything: everything in ruby is passed
| + 236342 [gavin refine] On Jan 26, 4:32 pm, Vincent Fourmond <vincent.fourm...@9online.fr>
| | + 236344 [martin marti] Is there any way for the function you're calling to modify the value of
| | | 236346 [dblack wobbl] def change_me(obj)
| | | + 236384 [shortcutter ] Absolutely right: Ruby uses pass by value - with references.
| | | | 236401 [dblack wobbl] I'm not sure that demonstrates the "values that are references" thing,
| | | | + 236410 [shortcutter ] I probably should have chosen different variable names.  I was trying to
| | | | | 236412 [wonado donne] May be it will be clearer to name an assignment "a = someobject" by what it
| | | | | 236413 [dblack wobbl] This message is in MIME format.  The first part should be readable text,
| | | | | 236431 [wonado donne] I agree. reference/value came from the world before talking about objects. I
| | | | | 236435 [dblack wobbl] This message is in MIME format.  The first part should be readable text,
| | | | | 236452 [robert.dober] Designated is just fine, I do not know  the verb betoken.
| | | | | + 236453 [robert.dober] the
| | | | | | 236462 [halostatue g] The simplest way to remember this is that variables in Ruby aren't
| | | | | | 236526 [thomas hafne] contain is a reference to an object. A variable is not such an object,
| | | | | | 236634 [halostatue g] It's better not to consider variables in Ruby as anything but a label
| | | | | + 236455 [robert.dober] the
| | | | |   236456 [robert.dober] SORRY folks my gmail went amok!!!
| | | | + 236529 [timx nospam.] *** NEWBIE WARNING ***
| | | |   + 236537 [fxn hashref.] I think those statements were informal, but just for the archives C only
| | | |   + 236637 [halostatue g] Your description seems to be okay, but forget "address" when dealing
| | | + 236385 [robert.dober] Just to demonstrate your point
| | |   236400 [dblack wobbl] That's a somewhat different point, though, having to do with variable
| | |   + 236402 [robert.dober] David, it is not my fault  that parameter  passing by value has the same
| | |   + 236405 [wonado donne] def modifying(a_param)
| | |   | + 236407 [dblack wobbl] This message is in MIME format.  The first part should be readable text,
| | |   | + 236533 [timx nospam.] In both the above cases, you are creating new objects that are only pointed to
| | |   | | 236535 [robert.dober] I could not agree  less, very simply because the two sentences
| | |   | + 236553 [nertzy gmail] On Jan 27, 5:34 am, Wolfgang NŠŇasi-Donner <won...@donnerweb.de>
| | |   |   236638 [halostatue g] When talking about Ruby variables, it is ALWAYS incorrect to refer to
| | |   + 236406 [wonado donne] def modifying(a_param)
| | + 236446 [thomas hafne] def oi(obj)
| + 236447 [halostatue g] Those are still passed by reference. It just so happens that they are
|   236450 [fxn hashref.] I think the problem in these discussions is that "reference" in the
|   236457 [thomas hafne] That's another story. With the code above you rather reset b to a new
|   + 236460 [fxn hashref.] Yes, that's the usual point in the discussion. Being able to change
|   | 236536 [parragh dayk] Could you point me to the exact locus?
|   | 236538 [fxn hashref.] "When the method or constructor is invoked (5.12), the values of the
|   | 236561 [parragh dayk] Thanks a lot, I was curious about this official description for a while!
|   + 236503 [dblack wobbl] It depends what value you're passing.  If the value is an array, and
+ 236336 [per velschow] Everything is pass-by-reference in Ruby. There is no pass-by-value. So
| + 236339 [wonado donne] May be, that you do in fact a copy by some other operations, that create a new
| + 236341 [dblack wobbl] I've always looked at it as: pass by value, where the "values" are
+ 236539 [listbox juli] Strings are mutable objects and should be treated as such :-)
+ 236558 [sonoflilit g] class Vault

^ Is Ruby clairvoyant [was Ruby WX (weather) ]
236337 [henryj parad] For the last couple of weeks I've been thinking about writing a

^ Working with the parse tree in Ruby?
236343 [martin marti] In Lisp, it's easy to get the parse tree of an expression, and to
+ 236351 [aaron_patter] Yes, you can get the parse tree using "ParseTree"
+ 236422 [pit capitain] Martin, in addition to what Aaron has written, I'd like to ask you what
  236783 [v.konrad lse] well, i have a use case (but this is doable, i think, with existing ruby
  236875 [pit capitain] Vlad, thanks for your example. I too think that you can use eval to

^ eval, HereDoc and Regular Expressions
236345 [atraver gmai] I'm having a bit of a problem with Ruby playing nice when it comes to
+ 236379 [m_goldberg a] If you want this to write "hi" to stdout, it should be
+ 236382 [nobu ruby-la] Nobu Nakada
+ 236396 [wonado donne] irb(main):001:0> a = "42"

^ String.insert newbie question
236347 [kreatix gmai] I've only been checking out Ruby for a couple of days, but today I came
236348 [slamboy gmai] irb(main):001:0> string1 = "abc"
236352 [kreatix gmai] Thanks for clearing that up, didn't know about object_id. Is this
236353 [jmettraux op] customer0 = Customer.new("John", "Doe")
236354 [kreatix gmai] Yes, that makes sense. I've even found a much simpler solution to my
236389 [threeeyedfis] I would like to notice, that if you ever need two separate objects, you

^ Log file
236357 [mathwhiz728 ] How do I log the user inputs from my program to a text file? I've looked
236432 [erikveen gma] Something like this?
236466 [jes luretank] A simple solution could be to use 'simplelog'.

^ Ruby extension (C++) on OS X [ruby 1.8.2] and Google-Sketchup [ruby 1.8.5]
236358 [Yue.Nicholas] I have written a ruby extension in C++ and it works fine on OS X
236398 [ryand-ruby z] That could should be fine in pretty much any version of ruby.

^ OpenWFEru 0.9.2 released
236360 [jmettraux op] The website is at http://openwferu.rubyforge.org

^ Ruby Program with RSS Feeds
236361 [frannydoodle] I am a new member to the Ruby forums. I am presently designing a small
236430 [neoneye gmai] There is a RSS lib distributed along with ruby.
236433 [neoneye gmai] Simon Strandgaard

^ download bioruby API document
236363 [chen_li3 yah] How do I download/install API document for Bioruby

^ Another Ruby language question
236364 [subs surfula] Following from yesterday I have a few more Ruby questions.
+ 236365 [hhausman gma] So in this particular case, 'self' here refers to the Module called
| 236366 [subs surfula] Harold,
| + 236369 [hhausman gma] No problemo.
| + 236370 [subs surfula] module Mod1
|   236372 [hhausman gma] indeed.
+ 236472 [cdcarter gma] I see people already helped you with this one

^ How do you run a .rb file in mac?
236368 [sauron_the_g] how to run it on a mac. Should I download anything to execute it? I
236375 [nlloyds gmai] Open /Applications/Utilities/Terminal.app and type: ruby file.rb
+ 236388 [sauron_the_g] Thanks a lot, Nate. It worked. :)
+ 236390 [threeeyedfis] Good day!

^ prob with File.open and perms
236374 [unbewusst.se] File.open('a_file',File::WRONLY|File::TRUNC|File::CREAT) do |f|
+ 236378 [botp delmont] # --w----r--
| 236387 [botp delmont] pls ignore my post below. it's terrible. i should have deleted the outputted file before running the program again.
| 236391 [unbewusst.se] no prob at all, u've tried to answer something !
+ 236381 [nobu ruby-la] That is octal.
  236386 [unbewusst.se] Fine thanks for the trick ;-)

^ [ANN] One-Click Ruby Installer for Windows: 185-22 RC2
236377 [ml.chibbs gm] RC2 upgrades RubyGems to 0.9.1+. There were no other changes.

^ [ANN] Melbourne Ruby meetup: Tuesday 30th January
236392 [pete notahat] A reminder that the Melbourne Ruby group is meeting on Tuesday night,

^ Re: instance variables available in derived clases
236411 [ricisbest ya] I agree in many cases derived classes just extend an existing class, and
236426 [ricisbest ya] Anyone else got views on this??
236427 [gavin refine] It looks like Ruby 1.9 will give you the ability to define private
236461 [avdi avdi.or] To the contrary, it's not madness at all.  It's a legitimate
+ 236463 [ricisbest ya] I'm glad not everyone thinks I'm mad!
| + 236465 [vincent.four] Write a C structure holding your variables (it doesn't even have to be
| + 236492 [transfire gm] Use define_method against local vars.
|   236615 [avdi avdi.or] Whoa!  That's cool!
+ 236468 [wonado donne] I think this not possible in Ruby in general, because onybody can change a class
  236486 [ricisbest ya] Sorry - the code in my last entry should read...
  236487 [ricisbest ya] Anyway, looks like it's just the way it is in ruby, and I'm going to
  236649 [gwtmp01 mac.] Bertrand Meyer in Object Oriented Software Engineering talks a lot

^ Review of code please
236414 [markonlinux ] I'm hoping for some critique of the code below.
236416 [markonlinux ] Well!!,
+ 236424 [Rob AgileCon] Slurps in the entire dictionary as an array of lines (typically much
| 236479 [markonlinux ] Excellent, thanks
+ 236448 [erikveen gma] Here's a map-reduce-ish [1] solution.
  + 236480 [markonlinux ] wow! now that's going to take some understanding!
  + 236495 [w_a_x_man ya] Do you know what a one-to-one mapping is?
    236548 [erikveen gma] Do you know they're exactly the same? It's senseless to use

^ Re: Implementation of Symbols...
236438 [logancapaldo] Yeah, pretty much. If you really want to see, you can check out some of

^ Question about variable scope
236441 [robin.housto] Does the following code behave as you'd expect?
236449 [thomas hafne] I'll try. Everytime the block is executed, new variables n, i and j
+ 236459 [robert.dober] maybe OP thought that
+ 236484 [robin.housto] Thanks for the reply. I think I've succeeded in adjusting my mental

^ transparent text with rmagick?
236443 [lister pikkl] (this maybe more an imagemagick q that a ruby one, but here goes ..)
236467 [TimHunter nc] buffer = Magick::Image.new(250, 250) {self.background_color = 'none'}

^ Re: Ruby extension (C++) on OS X and Google-Sketchup [ruby 1
236470 [ snk gna.org] I'm surprised that it actually works in 1.8.2...
236494 [ryand-ruby z] Why? Nothing has fundamentally changed since 1.8.2. His code sample

^ Re: ruby-services 0.2.0
236478 [renard nc.rr] Sorry to kidnap this thread, but I can't seem to be able to start a

^ Question about digits
236481 [CHubas7 gmai] While playing a little with Ruby, I've been looking for a function
+ 236482 [robert.dober] class Integer
+ 236483 [fxn hashref.] Good. I'd expect each_digit to return strings though, since a digit
| 236490 [robert.dober] yield '-' if  want_sign && self  <  0  #  to continue  debugging
+ 236488 [fernando.mde] Why call them digits, if you can call them characters?
  + 236562 [vidar.hoksta] [... snip]
  + 236647 [botp delmont] # irb(main):003:0> (0...arbitrary_number.to_s.length).map{|digit|
    236672 [robert.dober] that's what we did, yielding as was required, no?

^ Net::HTTP Closes STDIN
236491 [james graypr] Kenneth Kalmer has brought up a HighLine issue and I'm trying to look
+ 236493 [drbrain segm] $stdin isn't closed, its at the end of file.  Use #closed? to test if
| 236496 [james graypr] Right, good point.
| 236497 [drbrain segm] $ cat test.rb
| 236515 [james graypr] OK, that makes sense.  However, why does moving that eof?() check
| 236680 [drbrain segm] I don't see this behavior.  With your original example I have to hit
| 236744 [james graypr] I just upgraded to Ruby 1.8.5 to see if it would make a difference,
| + 236746 [james graypr] I'm sorry, I meant it still claims $stdin is at eof?().
| + 236754 [lukfugl gmai] lukfugl@hephaestus:~$ ruby -v
|   236924 [drbrain segm] Then your getc may do something different than mine (BSD-ish).
|   236926 [james graypr] In other words, you don't feel this is a Ruby issue, right?
+ 236947 [gwtmp01 mac.] Thread.new { }
  + 236950 [ara.t.howard] Thread.new { }
  | + 236952 [lukfugl gmai] lukfugl@hephaestus:~$ cat a.rb
  | | 236956 [ara.t.howard] [nrt@anchor ~]$ ruby -v -e'  Thread.new{} and p STDIN.eof?  '   # ctrl-d
  | | 236964 [james graypr] Bingo.  It's actually a pretty significant problem for HighLine
  | | 236977 [drbrain segm] Then it sounds like HighLine needs to check #closed? or continue
  | | 237060 [james graypr] But, as you pointed out, closed?() is not the same as eof?().
  | | 237063 [ara.t.howard] great - that make one of us!  ;-)
  | | 237106 [gwtmp01 mac.] I spent a bit of time looking at the code in io.c.  This
  | | 237190 [gwtmp01 mac.] Is the Darwin Ports (macports) maintainer for Ruby on this list?
  | | + 237191 [james graypr] Na.  I don't use MacPorts.  I built Ruby from source.
  | | + 237192 [james graypr] I wonder if this is related to the --enable-pthread option.  I used
  | |   237199 [gwtmp01 mac.] autoconf; ./configure; make
  | |   237220 [gwtmp01 mac.] Sure enough.  When I compiled 1.8.5 with --enable-pthread the test
  | |   237226 [james graypr] Ah, so it's likely a pthread issue.  Most of the instruction articles
  | + 236953 [gwtmp01 mac.] My post was based on ruby 1.8.5 on Darwin 8.8.0 Power Macintosh
  + 236954 [drbrain segm] If there are other threads and the IO isn't readable, ruby will run
    236958 [gwtmp01 mac.] I coded it that way on purpose to see if the issue depended on
    236965 [james graypr] Thank you.  I was beginning to think I was going crazy.  ;)

^ [ANN] Rassmalog 2.4.0
236498 [ snk gna.org] Rassmalog is a static blog engine based on RSS 2.0, YAML,

^ Backticks failing in Ruby built with VC++ 8
236501 [djberg96 gma] Ruby 1.8.5 p12
236502 [drbrain segm] Isn't pwd a shell builtin on WinXP?
236504 [djberg96 gma] Yes. Is that significant?
+ 236518 [nobu ruby-la] Really?
| 236525 [djberg96 gma] Oh, you're right (I got it from Unix Utils). But, it doesn't matter. It
+ 236547 [drbrain segm] It seems to be.
  236572 [djberg96 gma] As I responded to Nobu, it happens with any command. Besides, 'pwd'

^ [ANN] keybox 1.1.0 Released
236506 [jeremy hineg] keybox version 1.1.0 has been released.
236508 [gregory.t.br] Sweet.   Nice work jeremy
+ 236510 [jeremy hineg] Well kudos to James and you for accpeting my HighLine patch that made it
| 236514 [james graypr] Kudos to you for choosing to patch HighLine enough to meet your needs
+ 236512 [djberg96 gma] Yep, nice.
  + 236513 [jeremy hineg] I think the documentation for Keybox is pretty good, but feel free to
  + 236584 [gregory.t.br] Daniel, no, not just yet.

^ best way to access directory relational to current file
236516 [phil.swenson] I'm trying to find the full path to a file. File.dirname(__FILE__)
236517 [djberg96 gma] I think you want File.expand_path(File.dirname(__FILE__))
236564 [dan-ml dan42] require File.expand_path(__FILE__+'/../relative/path/to/file')

^ Re: DataVision, jRuby and Ruby
236531 [charles.nutt] That's a good question...DataVision is one of the oldest users of JRuby,
+ 236588 [gregory.t.br] I'll contact Jim Menard and see if he knows more about this.
+ 236716 [jim.menard g] Jim here. No, I don't actively support DataVision any longer. (After
threads.html
top