325987-333106

325786-338111 subjects 326177-338862

^ how can I switch over an array ?
325987 [lyon2003 lyc] def call(char,value)
+ 325994 [matt tidbits] when *" #!@$%".split("") -- extend string as desired
| 325995 [dblack rubyp] Yes, it will.
+ 326008 [shortcutter ] PATTERN = [
| 326013 [lyon2003 lyc] The one with
+ 326019 [b.candler po] SPECIAL = /\A[#{Regexp.escape(" #!@$%^&*(){}[]'\"<>,.?;\r\n")}]\z/
+ 326045 [apeiros gmx.] @map = Hash.new { |map, char| proc { |value| puts "don't know what to do
+ 326061 [w_a_x_man ya] def call char, value

^ how to iterate on date ranges
326004 [revathy.p an] If user enters, 2 date parameters.i want to find all the folders between
326006 [phasis gmail] require 'date'
326007 [Rob AgileCon] Why iterate a range of Strings when you can just use Dates!

^ ## Rabbi caught on tape with 17 stripper hidden video
326010 [lettus.belie] Right here http://rabbishare.blogspot.com/2009/01/rcmp-obstructed-paramedics-firefighter.html

^ Discover BSSIDs of Surrounding Access Points
326015 [btrichardson] I'd like to write a Ruby plugin to query the Skyhook Wireless API for

^ regexp multiple matches
326021 [faivrem gmai] /(\d+),(\d+)(;(\d+),(\d+))*/
+ 326024 [dblack rubyp] What's the string?
+ 326025 [andrew andre] Mickael
  326034 [faivrem gmai] And is there a way to keep previous matching ?
  + 326046 [andrew andre] What about tackling it from a completely different angle
  | 326048 [faivrem gmai] Sure, that's what I've just done :)
  + 326055 [Rob AgileCon] => /(\d+),(\d+)(;(\d+),(\d+))*/

^ how to get an absolute address of a link
326022 [lyon2003 lyc] Is there some URL lib that I can use to get the absolute address of a
326049 [lparravi gma] You can use URI.join
326052 [lyon2003 lyc] Very nice ! Thanks ! I was wondering if it would handle joins with

^ load a local gem while an older lib version still exists
326023 [edrd.dantes ] I have installed the mechanize 0.9.0.gem on ubuntu.
326030 [perfectly.no] Assuming the gem name is "mechanize", put this

^ Defining an ActiveRecord class within a method of another class
326027 [glenn_ritz y] class Results
+ 326031 [lyon2003 lyc] irb(main):042:0> class Res
| 326033 [lyon2003 lyc] Sorry , I pasted the same thing twice
+ 326043 [jgabrielygal] instance methods of the Results class. (The instance methods of the Result=
+ 326065 [b.candler po] Class.new(superclass) should do what you need without need to eval

^ Pushing up to Module or Class?
326035 [Shak shak.co] Yes, this question has been asked many times all over the Internet so I'm a
326039 [shortcutter ] I tend to view class inheritance in Ruby as "is a" relationship while

^ MiniTest & Test::Unit::TestResult in Ruby 1.9.1
326036 [jamesmead44 ] It looks like Test::Unit::TestResult [1] has disappeared in Ruby 1.9.1. Is
326038 [james graypr] This is correct.  Test::Unit has been retired.
326071 [transfire gm] Retired? I beleive it is still an active project, only it is now a
326073 [james graypr] Yeah, my bad.  I should have said it has been retired as a standard

^ [ANN] backup.rb
326040 [funkaster gm] ;-)

^ MiniTest / Test::Unit
326041 [jamesmead44 ] I'm struggling to understand the combinations in which MiniTest and
326053 [gregory.t.br] You can also gem install test-unit -v 1.2.3 on 1.9.1 to get back the
326181 [jamesmead44 ] 2009/1/28 Gregory Brown <gregory.t.brown@gmail.com>

^ function inside a function
326042 [jason.lillyw] def function_a(x = 1)
+ 326044 [jgabrielygal] The problem here is that when you write function_a, this is actually
+ 326054 [CHubas7 gmai] In ruby, function_a is a method call (with no arguments), and as a
  + 326059 [jason.lillyw] Perfect. Thank you!
  + 326062 [b.candler po] Or, if you really want to do this with def'd methods, you can use

^ "adding" two hashes
326066 [bryson maili] I'm wondering if it is possible to "add" the values of two hashes
+ 326067 [ben bleythin] irb(main):007:0> a = {:a => 1}
+ 326068 [Rob AgileCon] => {:key_two=>200, :key_one=>100}
+ 326069 [rmagick gmai] No built-in way, but it would be easy to use hash1.each_key to iterate
  326077 [Rob AgileCon] => {:key_two=>500, :key_three=>400, :key_one=>100}

^ Ruby on Solaris 10 performance problems
326070 [colmac gmail] We just installed ruby on a
+ 326081 [djberg96 gma] What version of Ruby?
| 326153 [colmac gmail] ruby 1.8.7 (2008-08-11 patchlevel 72) [sparc-solaris2.10]
+ 326156 [shortcutter ] SPARC processors are slow, raw CPU speed is not among the strengths of
| + 326157 [colmac gmail] ...snip... IMHO it's a dead technology.
| | 326159 [shortcutter ] I don't say that Sparc machines or Solaris operating systems do not
| + 326240 [rubfor recit] CISC processor commands are more powerful, so you need
+ 326188 [mark thomasz] I wonder what kind of performance you'd get if you used JRuby 1.1.6+
| 326213 [colmac gmail] java runs 7 times slower on this RISC platform, just going to drop it.
| 326342 [charles.nutt] 7 times slower than what? Non-RISC?
+ 326211 [overlord gmx] What machine are
  326214 [colmac gmail] at this point it does not matter. really the only question was why it is
  326239 [pbooth nocoi] charset=US-ASCII;
  326242 [shortcutter ] I am not sure I understand what you mean by that since you seem to
  326275 [colmac gmail] Thanks Peter and Robert for all your insights about his subject. This
  + 326338 [shortcutter ] That sounds extremely long.  I'd dig into that issue. Do you have
  | 326532 [pbooth nocoi] I'd second Robert's comment. If your web app takes 5 seconds to build a
  + 326351 [colmac gmail] This illustrates the importance of complete disclosure of information

^ problems with rubygems while debugging
326072 [mail noe-spi] $ ruby -rdebug test.rb
326091 [abc3def gmai] ruby -rubygems -rdebug test.rb
326475 [mail noe-spi] thank you very much, that's it.

^ yield vs. return
326076 [klochner gma] I couldn't find any meaty discussions on this topic, so maybe it's
+ 326078 [stefano.croc] yield and return do completely different things, and you can't use one in=20
| 326080 [klochner gma] On Jan 28, 3:21=A0pm, Stefano Crocco <stefano.cro...@ali
| 326145 [shortcutter ] 2009/1/28 klochner <klochner@gmail.com>
+ 326083 [fred lacave.] Depends on what you do with it.  I kinda like to use yield in "builder"
  326085 [klochner gma] thanks Fred, this sounds sane to me.

^ Errno::ENOMEM reading a device in Ruby, not in Java though
326079 [rogerpack200] Question on how to avoid an Errno::ENOMEM
+ 326132 [matz ruby-la] Strange.  ENOMEM is not listed among errors that read(2) can raise.
+ 326137 [phasis gmail] The another difference between ruby and java is read buffer size.
  326179 [matz ruby-la] I didn't know that.  In that case, you have to pre-allocate reading

^ Issue with 'OptionsParser' and my brain
326082 [Aldric Giaco] So, I followed the tutorial and got this far..

^ Bitwise question
326084 [abarringer b] charset="us-ascii"
+ 326086 [pjb informat] (def check(permissions,bits)
| + 326088 [Rob AgileCon] class Integer
| | + 326100 [pjb informat] Simplier?  A class, two methods, a lot of operations, a lot of memory!
| | | 326116 [dblack rubyp] as_bits is just there to provide information for the sake of
| | + 326115 [dblack rubyp] Thanks for the reminder about Integer#[], one of those cool Ruby
| |   326128 [no spam.plea] 9547[0..-1]
| |   326130 [abarringer b] Thanks guys, the answers provided contained what I was looking for. I =
| + 326089 [dblack rubyp] Possibly more efficient since it short-circuits on the first failed
| + 326094 [albertschlef] That what happens when one spends his time typing parenthesis instead of
|   326102 [pjb informat] Bit 0 is the first bit.  2^0 = 1
|   326114 [albertschlef] I stand corrected.
|   326117 [dblack rubyp] I could imagine wanting to handle the [] case conservatively. If the
+ 326098 [apeiros gmx.] requested_bits.all? { |bit| permissions[bit] == 1 }

^ [ANN] sys-proctable 0.8.0
326087 [djberg96 gma] I'm happy to announce the release of sys-proctable 0.8.0.

^ Compiling mysql-ruby-2.8 problems
326090 [abc3def gmai] I am trying to compile mysql-ruby-2.8
326112 [abc3def gmai] I have compiled it (had wrong environment), but still don't understand
+ 326162 [abc3def gmai] Getcha. 'main' stands for 'int main()' and actually does nothing here,
+ 333058 [krazonline g] I m very knew to Ruby, and I m also having similar issue. i.e.
  + 333084 [jazzezravi g] In case you are working in Windows then do this.
  + 333106 [abc3def gmai] 1. Start > Visual Studio 2008 > Visual Studio Tools > Visual Studio

^ Studying the object model
326093 [albertschlef] I'm looking for some study aid. I want to understand Ruby's object model
+ 326118 [satish.talim] The Pragmatic screencast - Episode 1: Objects and Classes ($5.00, 29
+ 326131 [m.fellinger ] (it's free, unlike the screencast)
+ 326133 [justincollin] I think you want something more visual than this (?) but you can always
  326144 [shortcutter ] Here's an easy way to get a visual graph of the currently defined

^ error with regular expression inside eval block
326096 [barunio gmai] I'm seeing strange behavior with Ruby 1.8 when I try to evaluate a
326097 [ibc aliax.ne] eval %Q{'1' =3D~ /^[\\d]+$/}
326099 [barunio gmai] Ah, thanks that worked. I wonder why extra escaping is needed just
+ 326147 [b.candler po] It's not in a block, it's just inside a string. There are two types of
+ 326160 [shortcutter ] It's not a block - it's a doubly quoted string!

^ proper use of classes
326101 [tomcloyd com] Greetings...
+ 326119 [dblack rubyp] instance.some_method(data)
| 326149 [tomcloyd com] Uh, yes. I had undervalued this possibility, about which I did know. I
| 326155 [dblack rubyp] "Class" and "method" are not commensurate. They're categorically
| 326161 [b.candler po] Good example. Similarly, methods which act on the filesystem, but don't
+ 326158 [shortcutter ] You might want to have a look at all those patterns around - they
| 326191 [tomcloyd com] David, Brian, Robert - THANKS!
| 326251 [dblack rubyp] I definitely would not discourage exploration of this kind. I'm 100%
| 326360 [tomcloyd com] Ah. Now I understand. I actually never positing that at all. I didn't
| + 326362 [pjb informat] First you write a problem statement.
| | 326432 [tomcloyd com] Pascal,
| + 326365 [shortcutter ] IMHO there is an important distinction though which makes Fortran
|   326431 [tomcloyd com] Robert - I absolutely agree, and I can to that (or THOSE)
+ 326194 [martindemell] One thing that might help is an object to encapsulate the environment
  326205 [tomcloyd com] Wow. Martin that's a fascinating idea. Terrific notion. Gonna try to

^ [ANN] rdoc 2.3.0 Released
326103 [drbrain segm] rdoc version 2.3.0 has been released!

^ [ANN] rdoc_html_templates 2.3.0 Released
326104 [drbrain segm] rdoc_html_templates version 2.3.0 has been released!

^ [ANN] rdoc_chm 2.3.0 Released
326105 [drbrain segm] rdoc_chm version 2.3.0 has been released!

^ RDoc 2.3 now with Darkfish, without CHM and extra HTML templates
326106 [drbrain segm] This release of RDoc brings some big changes. Most notably Michael =20
+ 326121 [vjoel path.b] It does look nice, except for source code display. The bg color is gray,
| 326122 [mike.gold.44] I appreciate the effort, it's just the colors do seem odd.  The
+ 326129 [m.fellinger ] ^ manveru
+ 326150 [martindemell] The RDoc documentation is a pretty bad sample, since the majority of
| 326168 [drbrain segm] On Jan 29, 2009, at 3:24, Martin DeMello <martindemello@gmail.com>
| 326178 [martindemell] Will sift rubyforge for candidates. Prawn looks pretty good in terms
| 326180 [gregory.t.br] Now that prawn has been split out into various extensions, prawn-core
| 326224 [drbrain segm] sudo gem rdoc --all --no-ri
+ 326250 [no spam.plea] Thanks, I think it's an improvement. Still has a way to go IMO, however...
| + 326262 [james graypr] I whole heartedly agree with that.
| | + 326264 [transfire gm] How could anyone NOT agree? Since the file page often contains nothing.
| | | + 326265 [gregory.t.br] Oh, that's a very interesting thought.  +1
| | | | 326266 [james graypr] Yeah, I agree.  That would be nice.
| | | + 326322 [drbrain segm] more -t and vim -t work very well for me...
| | + 326308 [drbrain segm] Try the quicksearch at the top of the class index
| |   326315 [radek.bulat ] section FILES: bullet_toggle_minus.png (I think that all .png files
| |   326324 [martindemell] I've filed a bug for this
| + 326318 [drbrain segm] If you don't file a bug it won't get fixed.
|   326355 [no spam.plea] Done. I wasn't familiar enough with RDoc to be sure it was a bug,
|   326429 [drbrain segm] If you think it could possibly be a bug, best to file it!
+ 326259 [transfire gm] (Sigh. the Google Group mirror is acting up again, so i will be replying
| 326320 [drbrain segm] format =20
+ 326566 [rogerpack200] I do like how the new sample looks.
| 329503 [drbrain segm] format =20
| 329534 [rogerpack200] Thanks for doing that.
| 329552 [drbrain segm] $ curl -I http://rdoc.rubyforge.org/RDoc/RDoc.html#M000417
| 329557 [matt tidbits] You didn't read what he said. He said that on that page are links to
| 329718 [drbrain segm] ah, oops! fixed, RDoc 2.4.1 forthcoming shortly.
+ 326750 [stefano.croc] for
  327192 [ged FaerieMU] That's my fault -- I hard-coded the path in the templates. I've added

^ Change Gempath at Runtime
326108 [me michaelbo] I have a problem with my host. I have several gems installed through
326109 [drbrain segm] ...

^ Search for string in folder names
326123 [revathy.p an] I will be getting some string through params[:first_name].and i want to
+ 326124 [andrew andre] Dir.glob("/path/to/base/dir/*#{search_string}*")
+ 326125 [azimuth-ruby] def getNames(param, directory = Dir.getwd)

^ Funny Videos
326126 [tomekwojciec] Free videos, humor, comedy, features to upload, share, rate and watch

^ Real life use of each_cons?
326134 [f.mischa gma] I've been going through the enumerable/enumerator methods that I'm
+ 326138 [gregory.t.br] I think you may have been confused by my ugly code there.  I have
| 326139 [gregory.t.br] Technical Blaag at: http://blog.majesticseacreature.com
| 326140 [f.mischa gma] Interesting. Thanks a bunch Gregory. Traversal had occurred to me as a
| 326142 [gregory.t.br] Already done.
+ 326143 [shortcutter ] Useful applications are those where you need a moving window over a

^ Rubygems and ~/.gem
326135 [m.fellinger ] I've been very happy to see the latest improvments in rubygems
326136 [m.fellinger ] @home_install_warning = true

^ Getting LoadError when using ruby and gem
326141 [bkondepudi g] I m seeing below error when I m trying to run one of the application.
326163 [abc3def gmai] Try this

^ clicking links in mechanize with :text=> nokogiri.css('a.l')
326148 [edrd.dantes ] i cannot click links in mechanize through their text content.
326169 [lparravi gma] There is no link with text 'parsing'. Just tried that google search

^ Check for two strings
326152 [revathy.p an] Is this possible to check for two strings.
326154 [shortcutter ] What kind of test do you want? Do you want both or at least one of them?
326221 [revathy.p an] i have tried your code.

^ MiniTest: a curious case of include (1.8 vs 1.9)
326165 [simon.a.chia] I've been messing around with minitest and came across something very
326174 [simon.a.chia] As an additional note to this, assigning constants in a describe under
326176 [dblack rubyp] It's not specific to minitest; it's a change in how constants are
326182 [simon.a.chia] Interesting.  I expected it would be something like this.  Kinda makes
326185 [dblack rubyp] All it means is that you can't make an assertion in the spec that
326291 [simon.a.chia] I guess there's something to that.  Here's a good workaround that
326640 [jtprince gma] Here's a workaround that combines the include call with a const_get

^ [ANN] The RSpec Book is now in beta
326166 [dchelimsky g] I=92m pleased to announce the beta release of the Pragmatic Bookshelf=92s =

^ Add randomize method to array?
326170 [bart.braem g] Perhaps a silly question. What is the best way to add a randomize
326171 [dblack rubyp] I have no idea how performant this is compared to other ways but the
326172 [lparravi gma] Ruby 1.8.7 also have shuffle and shuffle!
326173 [dblack rubyp] I consider 1.8.7 to be 1.9.-1 :-)
326248 [shortcutter ] Of one make ten,

^ RDoc plain text docs with command to create an HTML table?
326175 [bschmeil aut] for quite some time I'm trying to get RDoc to display an HTML table
326225 [drbrain segm] $ echo "<table><tr><td>1<td>2<tr><td>3<td>4</table>" > blah.txt
326252 [bschmeil aut] thanks a lot for your answer. Unfortunatly this still does not work for
326277 [drbrain segm] Then don't escape it.
threads.html
top