186092-187284

185864-186929 subjects 186290-188181

^ rexml - how to get element name
186092 [Gerald.Preis] If I have an instance of REXML::Element, is there a convenient way to
+ 186093 [nicksieger g] element.name
| 186235 [chneukirchen] How can one figure that out in pure Ruby?  It's rather easy, once you
+ 186094 [logancapaldo] charset=US-ASCII;
  186107 [Gerald.Preis] Logan,
  186141 [dharple gene] It's a downside of rdoc. Up at the top[1] you see that the Namespace

^ input without blocking
186095 [yahn15 hotma] How do you do something like gets but without blocking?  All I want to
+ 186101 [eustaquioran] taq@taq$ irb
| 186261 [karl_brodows] There should be methods on Unix and Linux using select or something
| 186267 [ara.t.howard] require 'io/wait'
| 186275 [gwtmp01 mac.] I might be missing something here but couldn't another thread
| 186278 [ara.t.howard] sort of - STDIN.wait simply returns when a read from the io would not block,
| 186305 [yahn15 hotma] puts Time.now
| 186314 [ara.t.howard] wait takes a timeout.
| 186315 [yahn15 hotma] I'm just trying to get the characters being input into the program and
| + 186318 [ara.t.howard] fortytwo :~ > cat a.rb
| + 186328 [M.B.Smillie ] STDIN.print "Type away: "
|   186329 [M.B.Smillie ] Those should, of course, read "STDOUT" rather than "STDIN".
+ 186112 [drbrain segm] Use threads.
| 186228 [yahn15 hotma] Ok thats one way to do it, but doesn't ruby have an actual way of just
| 186240 [vjoel path.b] A thread won't cost much if it is just waiting for input.
+ 186313 [ajohnson cpa] I was going to suggest using the Fcntl extension to set the non-blocking
  186316 [ara.t.howard] this seems like a bug...  maybe a post to ruby-core?
  186321 [ajohnson cpa] Probably a good idea -- unless no-one else is seeing this behaviour?

^ Waiter, there's a noob in my soup!
186098 [jp jeffpritc] Another thread here made me realize that I have a perfect use for
+ 186100 [gene.tani gm] how about a Beautiful soup example
+ 186106 [gene.tani gm] this is kinda close, it uses BeautifulSoup
| 186308 [jp jeffpritc] Thanks Gene, but I don't know which end is up with Python.  I'm an old C
| + 186310 [jp jeffpritc] ...or even just a Ruby example of  how to use a URL to get the source of
| | + 186340 [gene.tani gm] to get the file but not the style sheets, GIF spacers and all the other
| | + 186368 [jesusrubsyou] require 'open-uri'
| + 186311 [james_b neur] I build the RubyStuff.com site by snarfing a series of Cafe Press pages,
| + 186341 [gene.tani gm] ...
+ 186523 [leavengood g] robust in my experience. So far I've used it to scrape my library's
  186536 [jp jeffpritc] Thanks to all who responded.
  186607 [aglarond gma] Perl??
  186663 [dharple gene] It is a port of a Perl library.
  + 186678 [jp jeffpritc] You guys are great!
  + 186680 [james_b neur] But I believe certain niceties were added, so it may not be exactly the

^ compile in static library with mkmf
186105 [goldfita sig] I have the following directory structure.

^ Duck typing bunches of strings
186108 [listrecv gma] In my quest to master the fine art of duck typing / overloading, I've
+ 186110 [danielbaird ] maybe you just want anything that has respond_to? :each and isn't a String.
+ 186128 [jasonhutchen] What's wrong with "object.kind_of?(Enumerable)" and
| 186168 [listrecv gma] String is also Enumerable, see OP.
| 186300 [jasonhutchen] The +Enumerable+ mixin provides collection classes with several
+ 186139 [dblack wobbl] If you really want to do duck typing in your method, then you would
  186169 [listrecv gma] That wouldn't be very duckish - I'd still need to explicitly state
  186213 [logancapaldo] Just curious, but what happens if you just throw a string at it?
  186398 [skmtspm veri] Splits _str_ using the supplied parameter as the record separator

^ Subclasses and constants
186109 [listrecv gma] class RemoteCommand
186131 [jim weirichh] I assume you meant:    class GetStockPriceCommand < RemoteCommand
186164 [listrecv gma] Jim,
186174 [robert.dober] and that is exactly why you should not use a  Constant.
186304 [listrecv gma] @@class_variables seemed to have the same behavior - if they were
186325 [robert.dober] No do not worry you do not, I just looked at an implementation that might

^ regexp and stack overflow
186114 [pere.noel la] SCRIPT_RE=Regexp.new('<script[^>]*>((.|\n)(?!/script))*</script>',

^ [ANN] Mongrel Web Server 0.3.12 -- Pre-Release
186115 [zedshaw zeds] Mongrel is due for a 0.3.12 release which will feature some pretty insane
+ 186120 [se digitale-] Oh my, this is so cool. Big props to them. I am really excited to see what
| 186122 [billk cts.co] All thanks to matz ?
| 186218 [james_b neur] Indeed.
+ 186155 [reid.thompso] Might be worth a post to provide a couple of addr's to which all who
  186307 [zedshaw zeds] You can send thank-you e-mails to Matt Pelletier ( matt@eastmedia.com ) and

^ Which UI toolkit
186123 [usenet kikob] I'll be building a small app which should look and feel native on
+ 186156 [david.bailey] I'm in the process of learning Ruby.  I'm writing a sudoku game as my
+ 186190 [john_sips_te] Looks like GTK+ is rapidly becoming an option. The MS Windows port has
+ 186221 [greg.kujawa ] You have a lot of other options, such as Qt

^ Shift_jis encoding issue?
186124 [kevin.jackso] I have a yml file with the following
186125 [kevin.jackso] $KCODE = 'SHIFT_JIS'

^ is -w really useful?
186130 [wybo servaly] I would like to use the -w commandline option always, but any useful
+ 186150 [james graypr] [snip warnings]
+ 186243 [collinsj sea] Some warnings are really just informational. For example, redefining a
  186254 [wybo servaly] Sure, that's all true, and I want to see such messages to warn myself for
  186327 [robert.dober] pragma :warnings_on
  186487 [wybo servaly] Well, you can already say: $VERBOSE = true or $VERBOSE = false.
  186495 [ajohnson cpa] Actually, $VERBOSE can take on three semantic values: nil, false, true.

^ Variables in REXML
186132 [spambait mai] Real nuby question.
+ 186134 [pbattley gma] root.elements["foo/bar[#{i}]"].text
+ 186135 [ruby-talk-ml] puts root.elements["foo/bar[#{i}]"].text
  186148 [spambait mai] Aha! The double quotes did the trick.

^ %x and mswin32: missing output (from binary character)
186133 [ruby-talk-ml] $ cat write.rb

^ Blixy Tee Bus Stop
186145 [Bil.Kleb NAS] So I was wearing my chunky bacon Blixy Tee
186179 [skhisma gmai] You appear to have discovered little Foxlings.  I would imagine they

^ Callback For A Timer Event To Display Widget in Ruby/Tk
186152 [david.bailey] Kind All,
186187 [nagai ai.kyu] For such case which is sensitive about interval time,
+ 186223 [david.bailey] Kind Responder,
+ 186338 [david.bailey] I have coded the 'elapsed time' display that I needed.  I used TkTimer
| 186384 [nagai ai.kyu] Probably, if you don't keep any references for those Time objects,
| 186429 [david.bailey] H.N.,
+ 186371 [david.bailey] I have coded the 'elapsed time' display that I needed.  I used TkTimer

^ ara's double_x : generate xml?
186158 [itsme213 hot] Does this library support generating of xml (not xhtml)? what's the top
186159 [ara.t.howard] require 'xx'
186161 [itsme213 hot] thank you sir. love the library. is the '_' convention something that is (or
186175 [ara.t.howard] it is actually configurable.  you do something like
186195 [itsme213 hot] - if I have a conflict with the '*_' convention, &
186204 [ara.t.howard] ah.  no.  however, it would be a 3 minute exercise to add this capability.
186236 [itsme213 hot] If you think it would be generally useful. For right now I'm fine with '_'.

^ tagged unions and instantiating objects
186162 [parisnight g] I frequently work on binary data files that contain data structures
+ 186180 [ara.t.howard] module Type
| 186226 [parisnight g] Oh, I see, so module almost serves purpose of an abstract class.  Can
+ 186185 [robert.dober] Hmm maybe I did not understand your request completely but the following
  186239 [parisnight g] Passing in the parent instance to the child is a nice approach.  In the
  + 186256 [ara.t.howard] class K
  + 186326 [robert.dober] I am afraid that is not possible, remember that you have only a reference t=
    186451 [parisnight g] Thanks for all the suggestions.  Although we can extend an object
    186488 [benjohn fysh] Unless you take a look at delegate :)
    186633 [parisnight g] I don't know delegate well but it looks like the original object and

^ Verifying SSL with http-access2 on Windows
186163 [listrecv gma] Anyone know how to get http-access2 to verify the SSL Certificate on
186303 [listrecv gma] Could someone point in the right direction on this?  Or, if my question
186396 [listrecv gma] Am I the only one whose ever tried to use http-access2 SSL on Windows?
186432 [zhengyi anar] I can't see why it would be different on Windows vs. Unix, but who
186440 [listrecv gma] Thanks - I guess I'm looking for a way to do this with "universal" root

^ Re: B & E (#72)
186172 [semmons99 gm] I think that there are more key presses then you think. There are
186248 [steve waits.] I'm not sure I follow you..
186360 [semmons99 gm] You are right that there are 10,000 unique codes, but each of those
186377 [matthew.moss] I think part of the problem was that it didn't matter which modifier
186406 [steve waits.] That's right.  Sorry for the confusion.
186418 [semmons99 gm] I understand now, here is my modified solution, it does work a bit

^ accessing object from dRuby server
186177 [beeplove gma] #!/usr/bin/env ruby
186183 [beeplove gma] nvm.. I found the answer from archive... I need to used DRb::UnDumped.. !!

^ WIN32OLE heartburn
186182 [drathmann sp] After using WIN32OLE, I have been having trouble using WMI to create a
186222 [jelenicm gma] require 'win32ole'
186255 [drathmann sp] Thank you for the reply.  Is there another way to reach a remote
186370 [jelenicm gma] require 'win32ole'

^ Searching Active Directory
186184 [rboone mail.] I have been trying to research this myself but I haven't come up with
186324 [dave burt.id] Set x = CreateObject("Foo.Bar")

^ Scintilla text editor can't find Ruby file (another really basic question)
186189 [paul.denling] I have installed Ruby and saved a file "calc.rb" per this lesson, which

^ Simple pattern matching
186191 [minkoo.seo g] Sorry for newbie question. Given the line like
+ 186194 [robert.dober] 'node: { title: "15597629" label: "up[0,18 p:-2270.125]" }' =3D~
+ 186199 [rossrt rosco] s = 'node: { title: "15597629" label: "up[0,18 p:-2270.125]" }'
+ 186202 [w_a_x_man ya] 'node: { title: "15597629" label: "up[0,18 p:-2270.125]" }'.
+ 186203 [ruby-talk wh] => "15597629"

^ can't require ActiveRecord gem
186196 [fxn hashref.] According to the manual, if I call ruby this way
186225 [jim weirichh] Make sure you say:   require 'active_record'
186230 [fxn hashref.] Gotcha! Thank you very much Jim.

^ Strange gets problem
186200 [eobusek bell] I'm new to Ruby so perhaps this is obvious to you but not to me.  Can
186205 [ara.t.howard] you have not given a receiver to gets and the default one is ARGF (see pickaxe
186270 [Eric.Armstro] That almost makes sense, except for the name of the receiver.
186274 [ara.t.howard] yes and no.  first off gets is a method of IO and it does read from piped
186281 [Eric.Armstro] So far, so good. Makes perfect sense.
186282 [ara.t.howard] ruby doesn't know that you didn't mean to say to read the file '60', which is
186284 [Eric.Armstro] Brilliant! Thanks much for the explain-o.

^ Concatenation of regular expressions
186207 [skhisma gmai] Is there a way to concatenate regular expressions in ruby?  Something
+ 186208 [ara.t.howard] you could do (untested)
+ 186210 [logancapaldo] irb(main):010:0> SetThenField = Regexp.new(Set.to_s + '([\s])*' +
| 186214 [skhisma gmai] I was thinking of doing it this way but it seems somewhat unruby.  From
+ 186215 [ajohnson cpa] class Regexp
+ 186216 [dblack wobbl] Set = /\[[1-9]\d\]/
  186217 [skhisma gmai] Makes for slightly better looking expressions.  I thought this was the

^ [ANN] ruby-sendfile 0.9.2
186219 [toby cbcg.ne] Just a quick release, fixing that lame typo that Zed thankfully pointed

^ "Unflattening" arrays
186224 [farrel.lifso] Is there an easy way to get [1,2,3,4,5,6,7,8] into
+ 186229 [Daniel.Berge] See Enumerable#partition
+ 186231 [dharple gene] require 'enumerator'
| 186237 [farrel.lifso] This is just what I need. Thanks!
+ 186232 [sylvain.joye] Check Enumerable#each_slice
+ 186233 [matthew.moss] require 'enumerator'
+ 186238 [ajohnson cpa] From 'enumerator.rb' , #each_slice(n) lets you iterate over successive
+ 186241 [w_a_x_man ya] [1,2,3,4,5,6,7,8].inject([[]]){|a,x|

^ Compiling Ruby Source on Win32
186234 [pete nospam.] I want to compile the ruby source so I can have a play with the source

^ IRB Core file ?
186242 [kitesurf27 g] I have screwed up my cygwin env enough on my windows machine so that irb
186295 [marcantonios] If I understand correctly you're looking for a coredump.  Many times

^ Recommended templating system
186244 [alexandru gl] I'm new to Ruby, coming from PHP and Perl.
+ 186251 [steve waits.] I'm not sure you'll get consensus.  Also don't forget erb, which is
+ 186259 [damphyr free] I had quite a time trying to decide. I went initially with Amrita (which
+ 186334 [alexandru gl] Thank you for your suggestions.

^ New Optimization idea.
186247 [john.carter ] I have a couple of classes like so...
+ 186442 [bob.news gmx] class Foo
| 186482 [john.carter ] I didn't want to do that since @mine.each and .has_key? was going to be
+ 186736 [ryand-ruby z] Maybe it is just me, but I find your original code much easier to
  186959 [john.carter ] Like any optimization, premature, it's the root of all programming evil.

^ Gets and chomp method question
186258 [paul.denling] I'm working through the "Gets and chomp method" section of Learn to
+ 186264 [collinsj sea] Where are you running the program from? Inside some IDE? From the
| + 186265 [collinsj sea] Nevermind, I see you are running Scintilla and I don't know anything
| + 186386 [paul.denling] I'm running it from the SciTE editor which comes bundled with Ruby.
+ 186272 [w_a_x_man ya] You ought to be running it from the command-line interpreter.

^ Newbie:  Equivalent to "this" keyword in Java?
186260 [weyus att.ne] If I am writing a method and I want to refer to the instance of the
+ 186262 [hal9000 hype] It's self. There's no alias, but you can say
+ 186263 [wilsonb gmai] It's "self", and it can also be used to differentiate between local
  186273 [weyus att.ne] Got it.  I was auto-creating a variable named "this" before :).

^ ./configure doesn't like CFLAGS='-ggdb'
186269 [groups grand] My RubyCocoa app has started exploding with "BUS ERROR," or perhaps
186730 [groups grand] Is this a harder question than I thought, or maybe I asked this in the
186786 [nicolas.desp] I've just compiled the Ruby last cvs version with -ggdb and "make
187122 [groups grand] I'm not getting that far. "configure" won't let me try to actually
187197 [osivertsson ] I too can build both the latest CVS version and the 1.8.4 release with
187284 [groups grand] You are correct on all counts. I found the line you described with no

^ Ruby and SQL Queries
186271 [crackotter w] I am new to Ruby ( and to Miscrosft SQL). I want to be able to do very
+ 186299 [james_b neur] This may help
+ 186306 [gregory.t.br] On windows using the 1 click installer ruby-dbi comes installed by

^ [ANN] Ruby Social Club - 1st April Milan Meeting
186276 [kiaroskuro g] The Ruby Social Club is getting up to speed and spreading fast.  After

^ Using Rdoc when auto-creating methods
186277 [bpettichord ] For the Watir library, we had a lot of repetitive wrapper methods with
186280 [ara.t.howard] that's a good approach.  another is

^ Re: Newbie needs OOP guidance...
186279 [lthiryidontw] Lionel Thiry
186392 [info johnale] Did this ever get past Chapter 3.  I always thought the first three chapters
+ 186405 [wilsonb gmai] ...
+ 186469 [lthiryidontw] Best way to know: ask author : marick@visibleworkings.com

^ Would this be possible?
186285 [cschweitzer ] Would this work to find the mean average and the number of elements
+ 186286 [matthew.moss] I'm not sure how that would work....  you're re-reading the input stream twice.
+ 186288 [chris.alfeld] There are a few problems.
| 186289 [chris.alfeld] input = STDIN.readlines.collect {|x| x.to_f}
+ 186291 [dblack wobbl] This message is in MIME format.  The first part should be readable text,

^ RE : Gets and chomp method question
186287 [guillaume.be] I've never used Scintilla myself but I tried to run your program.
threads.html
top