323881-326028

323678-349707 subjects 324046-328182

^ Default values of hashes
323881 [glenn_ritz y] trt_hash = Hash.new( {} )
+ 323882 [Rob AgileCon] "If a block is
+ 323883 [botp delmont] # I would be able to add any key to trt_hash and its value=20
  323901 [glenn_ritz y] Both solutions are great.  I had something else that was sort of working, b=
  323909 [glenn_ritz y] I actually have a followup question to this one.=0A=0AIt turns out that som=
  + 323911 [dblack rubyp] h = Hash.new{|h,k| h[k]= Hash.new{|h2,k2| h2[k2]= Hash.new{|h3,k3| h3[k3]=0}}}
  | 324144 [jgabrielygal] irb(main):009:0> hash = Hash.new{|h,k| h[k] = Hash.new(&h.default_proc)}
  + 323921 [sepp2k googl] def nested_hash(levels, def_value=3Dnil, &def_proc)
    323938 [dblack rubyp] This message is in MIME format.  The first part should be readable text,
    + 323952 [glenn_ritz y] In your other post, there is no default value for the innermost hash.
    | 323961 [Rob AgileCon] Glenn,
    + 323973 [sepp2k googl] Because a) that way you can't define a default value or proc for the innermost
      323986 [dblack rubyp] I'm with you on a) and d) :-) I didn't understand the OP to be asking
      324091 [glenn_ritz y] Thanks for the tips.  I learned a lot from all of the suggestions.
      324481 [dblack rubyp] => #<Proc:0x00248420@(irb):14>
      324487 [glenn_ritz y] Thanks, David.  I think I understand it now.

^ win32ole and WMI question
323885 [baz0860 yaho] I am trying to get process information from Windows server. Using
323887 [phasis gmail] ret = process.execMethod_('GetOwner')

^ Re: win32ole and WMI question (Solved)
323888 [baz0860 yaho] Thank you for your help. It is exactly what I wanted. I spent a few

^ Re: Module specific metric methods for Numeric
323889 [bterkuile gm] Something went wrong and the message was submitted before I was

^ magic money world
323892 [arivu88 gmai] As a Magicmoneyworld member you will have your own referral URL

^ Re: Ruby 1.8.7: ERB is broken
323894 [charliemarx ] Actually comments will work in 1.8.7, but only with a specific, more
326028 [ruby.jordanb] Comments aren't supported, only comment tags are.

^ [ANN] Consent: a firewall DSL for ActionController
323900 [jcoglan goog] Hey all,

^ lost response while transfering large file to FTP server
323905 [lin.zhp gmai] When I used Net::FTP to put large files(about 200MB) to FTP server, the
+ 323919 [shortcutter ] Maybe you executed it in a thread and that died silently.  You can make
| 323922 [lin.zhp gmai] Thanks for reply.
+ 323950 [lin.zhp gmai] ftp_info=%x{
  323951 [lin.zhp gmai] And at this time, the backup file still got transferred successfully

^ VERY simple question about "?"
323906 [tomcloyd com] I absolutely love Ruby, but...I've always found the subject of Ruby
323908 [fred lacave.] It's simply a language construct, like the ' that delimitates a string
323910 [yaserbuntu g] And if you don't have the book, you can read that section[1] in the online
323913 [tomcloyd com] Thanks, guys.
323920 [shortcutter ] In this case nothing "happens" (see below).  It is just another
+ 323923 [mguterl gmai] There definitely is an option to select a PDF version for purchase.
| 323924 [shortcutter ] Thanks for the education!  I wasn't aware of this.  There was
| 323944 [tomcloyd com] I wouldn't engage with a illegitimate copy - isn't playing fair at all.
| + 323945 [caduceass gm] Not sure if the following list is comprehensive, but useful nonetheless...
| | 323946 [caduceass gm] I meant beneath Reserved words.  It's actually classified under Types/Numbers.
| | 323948 [tomcloyd com] Definitely a useful page, about which I've known for some time.
| | + 323980 [b.candler po] There aren't really any operators in Ruby. Ruby simply maps all these to
| | | + 323985 [tomcloyd com] Ah...This is actually very helpful. I think we have a language problem,
| | | | 323988 [b.candler po] That's not exactly the same though. You can (with a bit of work) define
| | | + 324007 [shortcutter ] Brian, you are contradicting yourself: first you deny the presence of
| | |   324024 [b.candler po] Operators in Ruby are nothing more than syntactic sugar for method
| | |   324063 [shortcutter ] Well, in a way that's what they are in every procedural language - they
| | |   324071 [b.candler po] I don't think so. Well, not in C anyway. The operation "a + b" is
| | + 323987 [sepp2k googl] As has already been mentionen, they are methods and do whatever they're
| + 323947 [dave pragpro] And we appreciate that :)
|   323953 [tomcloyd com] Oh, man...now I've going to have to get rigorous in my consideration of
|   323957 [dave pragpro] I think you're over thinking it. For example, in
|   323967 [tomcloyd com] Thanks, Dave. This helps. You have a genuine knack for simple clear
+ 323955 [tomcloyd com] Meaning, in linguistics as I understand it, is inherent, contextural, or
  324010 [shortcutter ] Unfortunately we're in the domain of programming languages which is

^ A question about Net-ssh
323907 [youhaodeyi g] I installed net-ssh by running the command: "gem install net-ssh", but I
+ 323916 [badboy heart] do you have a "require 'rubygems'" above your "require 'net/ssh'" ?
+ 323918 [djberg96 gma] Try "require 'rubygems'" first.

^ the thread problem in ruby imap
323912 [lanwen.bangb] my application is about ruby imap, it depends on daemons lib and runs
323915 [charles.nutt] I've noticed some really odd threading behavior in net/imap too. I think
323954 [lanwen.bangb] Charlie¡¤ thank you for your reply!
323983 [charles.nutt] Well, looking at imap makes my head hurt, so I'm going to say it's a
323984 [lanwen.bangb] Charlie, if you look at the imap implementation in ruby1.8 and ruby1.9,

^ How to control the time while ruby connect to oracle?
323917 [zengzhenyan ] require 'rubygems'
323993 [kubo jiubao.] Timeout.rb doesn't work when it is blocked in a C function.

^ Finding filename from a URL
323925 [asbestos999 ] This is just a basic parsing question, really. I'm trying to work out
+ 323926 [badboy heart] File.basename("http://www.example.com/x/y/z/myfile.txt")
| 323931 [asbestos999 ] Thanks a lot! I added ".txt" to the arguments of File.basename to get
+ 323927 [TimHunter nc] $ irb
+ 323928 [shortcutter ] IMHO it is not a good idea to use a File method for URL's because
  323936 [Rob AgileCon] Rather than jump to a Regexp, just use the right tool for the job.
  323941 [shortcutter ] I considered URI as well but what makes your code the "right tool for
  323942 [Rob AgileCon] I guess it depends on what your url might look like. For example, if
  324012 [shortcutter ] Certainly.  I do have to say that I get the impression we are talking a

^ First whack at thread safe Containers
323930 [robert.dober] Charly suggested thread safe containers some weeks ago. I finally

^ Saw children in the face of tanks
323934 [haithm72 gma] Saved their lives even one word

^ How can I prevent require duplicate files
323956 [youhaodeyi g] In a big ruby project, how to prevent requiring a file multiple times?
323958 [phlip2005 gm] require() already prevents multiple includes. load() forces an unquestioned input.
323964 [youhaodeyi g] require() already prevents multiple includes. load() forces an
323965 [phlip2005 gm] I don't know about all cases but I suspect the biggest culprit is require 'foo'
323976 [youhaodeyi g] But there is only one file named foo.rb, how could require 'foo' happen?
323977 [blambeau gma] There must be a mistake, below is the test I've made. No warning at
323978 [b.candler po] require 'test1'
323979 [blambeau gma] Well, we know that ruby 1.8.x doesn't ensure unique loading with that
323990 [b.candler po] Yuk, that will break any program which uses any sort of external
324036 [youhaodeyi g] This is the case, I have three files, a.rb, b.rb and c.rb.
324056 [b.candler po] That's the source of the problem.
324058 [youhaodeyi g] this works. thanks.

^ is there a way to get the paths to all previously required files?
323959 [timrandg gma] Let's say I am in irb and I execute
323962 [Rob AgileCon] $"                (historic variable)
323963 [timrandg gma] Here is a one liner that does it. Thanks for the hint.

^ I can't uninstall a few gems
323960 [orengolan gm] some info about my system: ubuntu 8.10, ruby 1.8.3, rubygems 1.3.1
323982 [djberg96 gma] What is the output of "gem env"? I'm guessing that you have multiple gem
324006 [orengolan gm] - RUBYGEMS VERSION: 1.3.1
324008 [luislavena g] INSTALLATION DIRECTORY indicates where the gems will be installed and
324041 [orengolan gm] thanks, it worked.
+ 324456 [orengolan gm] does anyone knows the cause for this issue and how can I prevent it from
+ 324471 [jcoglan goog] 2009/1/6 Oren Golan <orengolan@gmail.com>
  324525 [orengolan gm] got it. thanks!

^ Question about run external program in Ruby
323966 [youhaodeyi g] io=IO.popen("lsa 2>&1")do |f|
+ 323968 [andrew andre] Check $?.exitstatus
| 323969 [youhaodeyi g] I found that $?.exitstatus always return 0.
+ 323971 [andrew andre] io=IO.popen("ruby some_file_that_doesnt_exist")do |f|
  324048 [youhaodeyi g] How can I get stderr in this method?
  324049 [b.candler po] You are already combining stderr with stdout (2>&1)
  324139 [b.candler po] Another option is the open4 gem. See

^ Coding a server
323972 [aspirine gma] Hey,
323974 [jeremy hineg] Take a look at packetfu http://code.google.com/p/packetfu/
323975 [aspirine gma] the bindata dependency for packetfu is exactly what I was looking for
324009 [vjoel path.b] I don't know bindata, but from a quick glance at the docs I see that it
324020 [aspirine gma] amazing performance, for creating 10k instances of the same simple
324021 [vjoel path.b] Exactly. If you have big packets, and only need to access a few fields

^ Standard data-structures
323989 [blambeau gma] Does anyone know a gem with standard data-structures like AVLTree,
323995 [micathom gma] If neither raa nor rubyforge nor this list has the answer to your

^ Hash is not merged / recursive function
323994 [dominik.kreb] i'm new to ruby, but i really like it.
324000 [robert.dober] I have no idea what's wrong with your code, but I happen to know a

^ noob question: object to string
323996 [darin.ginthe] So I'm able to exercise creating my own class and returning an object
+ 324001 [caduceass gm] The count_table method will return whatever the last statement in the
| 324002 [darin.ginthe] I understand what you are saying... We used "yield" to return from the
| 324005 [darin.ginthe] Got it.  Yield goes straight to stdio.  Instead, return the first value
+ 324004 [jim.menard g] A block returns the value of the last expression inside it. The last
+ 324016 [wpdster gmai] I don't know anything about DBI, but what do you get as output from the "p
  + 324018 [darin.ginthe] Was working, but I'll take the context correction.
  + 324116 [justincollin] The OP's approach works as well. It's a shortcut which can be used with

^ i have some challenges with the date
323997 [junkone1 gma] here i have a string date like this. 02/01/2009 : Format is DD/MM/YY
+ 323998 [james graypr] => "2009-01-02"
+ 323999 [sepp2k googl] => "2009-01-02"

^ [ANN] January Phoenix Ruby User Group Meeting
324003 [james.britt ] January '09 Phoenix Ruby User Group Meeting

^ Noob Question: New to Programming
324013 [ericraio gma] Hey I am very new to ruby I am trying to learn as much as I can, I was
324019 [phlip2005 gm] Next, you gotta walk before you can run. Print out any of the excellent Ruby

^ Loading an extension on statically linked ruby
324014 [ehames gmail] I've configured and built the Ruby interpreter with the following

^ Writing accented characters into HTML files?
324015 [kenneth.m.mc] I'm having trouble when I write accented characters into HTML files;
+ 324030 [gmurray clou] Look into using a reference.  Valid references are dependent on the
+ 324057 [b.candler po] Use hexdump -C on the file to see what the actual byte sequences are. If
| 324083 [james graypr] James Edward Gray II
+ 324074 [gmane auxbus] Kenneth McDonald said...

^ What is the difference between this patterns
324022 [jon.stenqvis] What is the difference between decorator, adaptor and wrapper pattern

^ improvements to rdoc/alternatives
324023 [davetron5000] I love rdoc, but miss a few things from javadoc, namely the ability to
+ 324031 [ snk gna.org] Try YARDoc http://yard.rubyforge.org/
| 324035 [davetron5000] Yeah, that is what I'm looking for.  I guess part 2 of my question is
| 324039 [ snk gna.org] Although RDoc remains the de-facto API documentation tool for Ruby, it
| 324050 [ryand-ruby z] ...
| 324088 [ snk gna.org] I thought that because RDoc 2.2.x is released as a gem, it had been
| 324117 [ryand-ruby z] rdoc is developed externally but continuously integrated into ruby-
+ 324051 [ryand-ruby z] No, it really isn't. I think it is fair to say that rdoc won't being
  324078 [aff28 delete] It's a pity if duck-typing has become such rigid dogma.

^ [ANN] rubyforge 1.0.2 Released
324025 [ryand-ruby z] rubyforge version 1.0.2 has been released!

^ Convert Integers to Strings
324026 [gary.raffert] Howdy,
324028 [ryand-ruby z] yes but... gsub is much easier
+ 324029 [gary.raffert] Thanks mate
+ 324061 [njus larshau] => ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]
  324086 [gary.raffert] Nice one Lars.

^ WANTED: need a real web API for rubyforge.org
324027 [ryand-ruby z] I just released version 1.0.2 of the rubyforge command line client. It
+ 324032 [tjnogueira o] Ryan, I in!
+ 324040 [transfire gm] =A0
| 324065 [tjnogueira o] "...Going further. Doesn't it seem like it's about time for Rubyforge to
| 324145 [gregory.t.br] Yeah, you guys get started on that.  And when you have a very stable,
| 324146 [tjnogueira o] Ok. I'm here waiting for instructions sir :-)
| + 324152 [gregory.t.br] we would need a system with comparable functionality that can run on
| | 324155 [tjnogueira o] Greg , i'm really talking serious. I really want to contribuite with our
| | 324163 [gregory.t.br] I've pinged Tom.  He should either join in here, or send you an email directly.
| | + 324164 [tjnogueira o] Greg ,
| | + 324195 [tom infoethe] Yeah, this is a good discussion to have, and thanks to Greg for giving
| |   + 324198 [tjnogueira o] Well Tom, your arguments are valid and I agree completly. I think this
| |   + 324233 [anthonyeden ] Just out of curiosity, rather than rewriting the GForge app or
| |   | 324296 [ryand-ruby z] which is exactly what I was asking for before trans hijacked yet
| |   | + 324300 [transfire gm] And I did not hijack the thread. I just ask a related question.
| |   | + 324327 [tom infoethe] Hm, this is pretty interesting.  I wonder if we could do
| |   + 324374 [simon.a.chia] I know very little about this but I have always wondered if it would
| |     324384 [tom infoethe] Yeah, that's a good thought.  When I think about doing that, the
| |     324385 [gregory.t.br] Tom, could you possibly prepare a database dump that strips out the
| |     324669 [tom infoethe] That's a great idea.  Let me spend some time figuring out which fields
| + 324159 [marcelo.maga] If you are serious...
|   + 324161 [ben bleythin] There already is one in RedMine.
|   | 324175 [transfire gm] To me GForge seems very dated. I think GitHub is much better example
|   | + 324177 [james graypr] I've really come to feel this way too.  There's definitely more it
|   | + 324179 [djberg96 gma] I don't see a way to submit bugs.
|   | | 324192 [tjnogueira o] In this case ,i agree with you, dan.
|   | | 324249 [transfire gm] Dan, I think you over value some of these features -- download stats
|   | | 324271 [djberg96 gma] Except for a few projects that have either inadvertently or
|   | + 324190 [ben bleythin] I think that GitHub demonstrates many aspects of the model that
|   + 324165 [btricha gmai] Would it be worthwhile to consider Redmine (http://www.redmine.org)?  It's
|     324173 [djberg96 gma] 's
|     324189 [ben bleythin] I think this is a *terrible* idea.  The last thing we need is further
|     + 324191 [james graypr] I would be interested to hear what percentage of GForge features see
|     | 324334 [ben bleythin] Nope, but I feel pretty strongly that we'd all be better off if it had been.
|     + 324193 [djberg96 gma] I'm not sure how division in the community over where projects live
|       324335 [ben bleythin] Those are good points.  I guess it's a matter of whether or not this
|       324337 [gregory.t.br] old.rubyforge.org  ?
+ 324080 [gregory.t.br] Though we haven't really advertised it yet, the source for RubyForge

^ How can I find the source of ruby package installed by gem
324033 [youhaodeyi g] I installed a ruby application by gem. Where can I find its source code?
324034 [TimHunter nc] gem unpack
324037 [youhaodeyi g] OK, it works. thanks.
324038 [Rob AgileCon] There's also gem list -d gemname

^ thanks (Re: rubyforge 1.0.2 Released)
324042 [thaniyarasu ] thanks

^ Re: To get IP addres of the machine
324043 [rogerpack200] class Socket
+ 324053 [b.candler po] Your machine may have multiple IP addresses, but assuming its hostname
| 324093 [John.Haltiwa] require 'ipaddr'
| 324097 [gwtmp01 mac.] It is important to realize that this method won't take into account
+ 324115 [rogerpack200] heh

^ Re: DTrace segfaults on Leopard
324044 [sfjuggernaut] Any update on this?  I'm still seeing this on OSX 10.5.6...
threads.html
top