374094-375238

373855-374936 subjects 374235-376330

Comparing XML documents
374094 [trodwell@ie ] I'd like to check the equivalence of two XML documents.  Searching this
+ 374096 [m.fellinger@] Maybe using https://github.com/flavorjones/lorax
| 374146 [dvohra09@ya ] ...
+ 374102 [brabuhr@gm i] require 'active_support'
  374140 [shortcutter@] From an XML point of view documents with different child ordering are

Embedded Debugger
374095 [mach@da aa e] we are using Ruby from within of our application as a scripting toolkit,
374340 [jonas@pf nn ] take a look at the ruby-debug gem. It's meant to be used stand-alone and

How to set the path in Ruby / Rails in Watir.
374097 [venkatasiva_] I have installed Ruby1.9 version in c:/Ruby192/ drive but i have stored

Qt-Ruby implementation of the "Address Book Example"
374099 [arturo.bonec] I'm trying to implement the "Address Book Example" with Qt-Ruby.
+ 374123 [stefano.croc] - define a method called add_entry which takes two optional arguments
| 374126 [arturo.bonec] Thank you for the reply!
+ 374128 [stefano.croc] Yes, using an array here is correct. Everytime you see a collection
| 374139 [arturo.bonec] Ok, thank you.
+ 374143 [stefano.croc] Yes, you need to do that also for arrays, except when they stand for a
  374144 [arturo.bonec] Ok, thanks for all this details!

require problem
374103 [simone.spam@] mygem

gsub and backslashes
374104 [ralphs@do 32] ...
+ 374105 [ammarabuali@] Backslashes are tricky. What's happening here is each escaped
| 374107 [ammarabuali@] I should have added that you can get the same result with 3
+ 374124 [botpena@gm i] result of the above substitution is "no change"
| 374130 [ammarabuali@] => "\\\\1\\\\2\\\\3"
+ 374151 [b.candler@po] Here you are replacing one backslash with one backslash.
  374156 [ammarabuali@] That's a keen observation, but the fact that they happen to be
  374167 [shortcutter@] The key point to understand IMHO is that a backslash is special in
  374171 [ammarabuali@] Actually, 3 backslashes will yield one backslash. The first two result
  374172 [shortcutter@] irb(main):006:0> "abc".gsub /./, "\\\n"
  374183 [ammarabuali@] I think these examples are somewhat misleading, because the escaped
  374192 [shortcutter@] That is the very point of my posting: you cannot always use three
  374197 [ammarabuali@] I guess I took issue with the word tolerance. I don't think of lexers
  374216 [shortcutter@] y to
  374220 [ammarabuali@] That's a good example, and I know understand what you meant by tolerance.
  374231 [shortcutter@] Yeah, but I don't want to change \n, \t etc. in double quoted strings.

what is the minitest equivalent of assert_nothing_raised?
374106 [timrandg@gm ] Though it was in the test/unit module for 1.8, 1.9's minitest module
374117 [jbarnette@gm] It was removed because it's not useful enough. Test the proper behavior =
374118 [timrandg@gm ] 10.times{puts "Thanks John"}

The t-shirt photos from RubyConf -- does anyone have them?
374108 [dblack@ru yp] Does anyone have photos from the ten t-shirt thing we did at RubyConf

Partial GSUB match / replacement
374109 [shea@sy ac .] I need to match a somewhat complicated match using gsub, then modify
+ 374111 [ammarabuali@] You can use a block with gsub, where the back-references are
+ 374112 [milovan.zogo] string.gsub!(/(url\(['"]?)(.+?)(["']?\))/) { "#{$1}#{$2.upcase}#{$3}" }
+ 374113 [w_a_x_man@ya] "url(http://www.google.com)".sub( /\(.*?\)/ ){|s| s.upcase}
+ 374145 [shea@sy ac .] Thanks a bunch
+ 374147 [shea@sy ac .] Actually I'm having a bit more trouble.
+ 374148 [shea@sy ac .] My bad. had to put the replacement string in a block

Re: Execute one from two
374110 [milovan.zogo] just use load statement..

Problem regarding regular expression
374114 [ngkooinam@gm] puts( /^[a-z 0-9]*$/ =~ 'Well hello 123' )  # no match due to ^ and
+ 374115 [ngkooinam@gm] puts( /[a-z 0-9]*$/ =~ 'Well hello 123' )  # no ^, so match made at char
| 374121 [vderyagin@gm] Without * regexp may match only one char at the end of the string.
+ 374120 [vderyagin@gm] /^[a-z 0-9]*$/ must match the whole string (and it can't due to
+ 374122 [josh.cheek@g] Why don't you play with it at rubular.com for a while, it will help you to
+ 374132 [ngkooinam@gm] dudes,i am really confused with this.
| 374134 [josh.cheek@g] Could you elaborate on what has you confused? What do you expect it to
+ 374133 [ngkooinam@gm] pal,i think i need more elaborate on these two expressions if possible.
| + 374136 [ammarabuali@] => 0
| + 374141 [shortcutter@] Please don't write "need" and ask specific questions.  It's just too
+ 374135 [ngkooinam@gm] i think i roughly understand by now.
+ 375238 [user@co pg o] Some time ago, I needed to buy a good car for my firm but I didn't have enough money and could not purchase anything. Thank goodness my friend proposed to take the <a href="http://bestfinance-blog.com/topics/home-loans">home loans</a> at trustworthy bank. Thence, I did so and used to be satisfied with my commercial loan.

why i can't find my ruby ?
374127 [myocean135@y] sudo wget ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.tar.bz2
+ 374131 [dunric29a@gm] PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/ruby/bin"
+ 374137 [rick.denatal] First off you seem to be using sudo when it normally isn't used and
| 374150 [b.candler@po] That's untrue. ln -s is
+ 374157 [myocean135@y] sudo wget ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.tar.bz2
| + 374158 [ryand-ruby@z] PATH=3D"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/=
| + 374159 [timr@pr bo c] No, it's not.  You use sudo only when it is absolutely required, and as
+ 374532 [myocean135@y] when i installed ruby,
| + 374534 [niklas@br ec] typing "irb" & pressing TAB doesn't get you anywhere?
| | 374535 [myocean135@y] "irb" +pressing TAB   ¡¤nothing happen
| | 374539 [peter@va de ] $ which ruby
| | 374540 [myocean135@y] pt@pt:~$ which  ruby
| | 374541 [peter@va de ] (caveat, not actually tried, from memory).
| + 374536 [lucas@lu as ] How did you install ruby?
| | 374537 [myocean135@y] wget ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.tar.bz2
| | 374545 [lucas@lu as ] Then ruby isn't in your $PATH.
| + 374538 [botpena@gm i] you only created a link for ruby & gem.
+ 374776 [myocean135@y] $ cd /usr/bin

[ANN] Mast 1.3.0
374129 [transfire@gm] = Mast

[ANN] Arcadia 0.9.2
374152 [antonio.gale] Arcadia is a minimalistic Integrated Development Environment (IDE) for

Re: Ruby 1.9.2 is released
374153 [hacker.nz@gm] even after nuking /usr/local/lib/ruby/site_ruby/1.9.1/rubygems
374154 [josh.cheek@g] The error message says "undefined local variable or method `rsion'" that
374155 [hacker.nz@gm] Yes my bad sorry. Now I am trying to get my app working but seems like

debugging subprocess
374160 [hoverlover@g] I'm using Autotest to automatically run my tests when I modify my code.
+ 374166 [shortcutter@] Sounds like a buffering issue.  You could try
+ 374174 [hoverlover@g] Thanks Robert, but that didn't do it.  If you look up a few lines in the
| 374177 [shortcutter@] et on
+ 374178 [hoverlover@g] That didn't seem to do it either.  I put this in test/test_helper.rb,
| 374179 [shortcutter@] I don't know the details of ruby-debug, but are you sure that you can
+ 374181 [hoverlover@g] I say I am able to control the debugger because even though I can't see
+ 374211 [ryand-ruby@z] code.
  374212 [hoverlover@g] True, they are separate.  I guess my answer to that question would be
  374215 [ryand-ruby@z] code.

Send Message to fb message via facebooker plugin
374161 [udhaya.dhana] Using the facebooker plugin, i can only send email and post on wall.But

Displaying Weekdays
374162 [streetfi8er@] #/usr/bin/ruby
+ 374163 [botpena@gm i] require 'date'
+ 374164 [botpena@gm i] require 'date'
+ 374165 [streetfi8er@] Thanks a lot :)

proc question
374168 [jessicacolna] I'm trying to create a parser that creates a statemachine, using the

IIS Application Pool
374169 [giviglie@gm ] deploy some services. Now we need to implement the script stopping the

IIS Stop and Start Application Pool
374170 [giviglie@gm ] deploy some services. No we need to implement the script stopping the
374180 [gthiesfeld@g] I modified the code snippets to ruby.

get module names
374173 [tcblues@gm i] I would like to know the module names I have declared in other file but
374175 [spoon@ki le ] From=20
374176 [tcblues@gm i] Thanks a lot!!! It works!!!
374189 [josh.cheek@g] Note that it will give you all constants. You can use a reflection to get

help with simple game
374182 [blake@be li ] My boss told me to pick up a ruby book and start figuring, so he gave me
374184 [wagner.andre] This sounds more like a homework problem, but I'll give you the benefit of
374186 [blake@be li ] allrite allrite, how do i insert this in an interactive ruby window?
374187 [tim@ev i. om] You can copy and paste ofcourse.
374188 [wagner.andre] % ruby car.rb mustang camaro

Re: Working with YAML
374185 [anton.shchan] Posted via http://www.ruby-forum.com/.

BitStruct-28bit-Ruby Beginner
374193 [jaikanth.kri] I am a beginner to Ruby. I am using the  ruby 1.9.2p0 (2010-08-18
+ 374251 [timr@pr bo c] And did you read the documentation that says BitStruct supports fields of
| 374674 [jaikanth.kri] Yes I did read the documentation and was trying to see if some
| 374676 [cmdjackryan@] What about padding the 28bit data to 32bit length, with preceding
+ 374775 [brusch4_remo] "Jaikanth Krishnaswamy" <jaikanth.krishnaswamy@gmail.com> schrieb im

Matching multiple line reg exp
374194 [guillermo.ri] Trying for a couple of hours (again without success) to create a regular
+ 374195 [w_a_x_man@ya] On Nov 22, 2:33=A0pm, Guillermo Riojas <guillermo.rio...@gmail.com>
| 374196 [tokenshift@g] In multiline regular expressions in Ruby, the caret and dollar sign
+ 374214 [josh.cheek@g] only looks for the first match.

Pair Programming Interview Prep
374198 [rakeshrnagil] I have an upcoming pair programming interview primarily focused on RSpec
+ 374201 [sophrinix@gm] If you are applying at any reputable ruby/rails shop, they are
+ 374202 [rakeshrnagil] Do they expect candidate to come unprepared ? Better, if they post some
  374203 [sophrinix@gm] <BadPuns type="PulpFiction">

http digest auth client?
374204 [rochkind@jh ] Is there any mature library in ruby to make an HTTP request with http
+ 374205 [milovan.zogo] have you tried open-uri?
+ 374206 [tony.arcieri] Tony Arcieri
+ 374207 [ammarabuali@] This was recently released: https://rubygems.org/gems/net-http-digest_auth

system() or process.create?
374210 [lifengfeng@h] I'm a beginer of ruby, I want to know how to call external applications
+ 374224 [luislavena@g] =3D>
| 374253 [lifengfeng@h] Thanks for your reply. Maybe I didn't explain my problem clearly. My
| 374254 [arturo.g.art] Is "del" is an actual executable?  It used to be in old DOS but Mr. Windows
| + 374255 [cmdjackryan@] dows
| + 374257 [lifengfeng@h] I use fileUtils.chdir(dir) to change to a dir in which .zip files exist,
| | 374289 [reachme@ch r] Del is part of cmd.exe, which is possibly why Process.create is not
| | 374312 [lifengfeng@h] Thanks for your help, both 'cmd.exe /c del *.zip' and FileUtils.rm
| | 374331 [cmdjackryan@] Personally, I'd go with FileUtils.rm( Dir.glob('*.zip') ), just
| | 374408 [reachme@ch r] Yes, I'd definitely go with that.
| + 374777 [brusch4_remo] "Arturo Garcia" <arturo.g.arturo@gmail.com> schrieb im Newsbeitrag
+ 374228 [eleanor@ga e] to
  374256 [lifengfeng@h] Thanks, now it's ok:)

[ANN] regexp_parser 0.1.1
374217 [ammarabuali@] regexp_parser

nokogiri ip ban?
374218 [l17339@gm il] I've been playing with Ruby and Nokogiri to crawl some website to get
+ 374219 [andrea@an re] Bombing a webserver in the fashion you describe is not advisable in any
+ 374221 [cmdjackryan@] Run your crawler in steps (don't crawl the whole site, and only grab
+ 374222 [l17339@gm il] Hey guys... Thanks for your replies.
| 374223 [ammarabuali@] One more thought, what are you using for user-agent? Some sites block empty
+ 374225 [l17339@gm il] Yeah, that's one of the reasons I asked this question, because I though
| 374226 [ammarabuali@] It was just a guess. But, as you mentioned, your IP is being blocked, so
+ 374227 [l17339@gm il] Actually I was blocked before, and is like during 24 hours or so.

Regex negative look-behind bug?
374229 [b1st@ho ma l] irb, Ruby 1.9.1
+ 374230 [ammarabuali@] No bug here. It is doing exactly what you asked: only match a w if it is not
| 374233 [shortcutter@] That was an alternative!  If the RX in the lookbehind can match, the
| 374234 [ammarabuali@] The thing is what's in the lookbehind, and all assertions for that matter,
| 374259 [shortcutter@] is
| + 374265 [ammarabuali@] rushing out the door.
| + 374266 [ammarabuali@] rushing out the door.
|   374268 [shortcutter@] Probably not the best thing to do.  I know.  It has happened to me as well.=
+ 374282 [b1st@ho ma l] Ammar, Robert,
  + 374329 [shortcutter@] You're welcome.
  | 374350 [ammarabuali@] Thanks. I was too busy to follow up yesterday.
  | 374516 [shortcutter@] It's fixed already.
  | 374519 [ammarabuali@] Hallelujah! :)
  + 374349 [ammarabuali@] You're welcome. I'm fascinated by Oniguruma (ruby's regex engine) so this is

Ruby 1.8 vs 1.9
374232 [peter.pincus] how much longer will Ruby 1.8(.7) be maintained ? Is it advisable to
+ 374241 [cremes.devli] I believe the guys at EngineYard are in charge of backporting fixes to the 1.8.7 branch. I also heard there was a 1.8.8 coming at some point to be the final release in the 1.8 series.
| + 374242 [ryand-ruby@z] would say the biggest reason to use it is to get a performance boost. =
| | + 374243 [phil@pr co .] Who do I talk to get 1.9 RPMs produced for Fedora?
| | | + 374244 [ryand-ruby@z] Beats me.
| | | | 374248 [aaron@te de ] My uncle Carl is really good at IT.
| | | + 374245 [cmdjackryan@] Just a guess: The Ruby (or Programming/Script language) maintainers of
| | | + 374258 [flebber.crue] wiki is a start for fedora they have ruby packages in the
| | + 374250 [cremes.devli] Definitely true. That's why I was careful to say "My code sees a 2-5x speedup..." because I have seen a few instances where 1.9 is a tad pokier. But clearly 1.9 is the future so sticking with 1.8 seems like a bad long-term bet.
| + 374260 [b.candler@po] And just to give some balance: the biggest reason not to use 1.9 is
|   + 374263 [spam.entfern] Sounds great. ;-) Can somebody else confirm this?
|   | 374267 [m.fellinger@] iota ~ % echo  | LC_ALL=ja_JP.UTF8 ruby -pe '$_[1,0] = ""'
|   | 374269 [spam.entfern] So working with strings in ruby v1.9 is not supported, right?
|   + 374264 [m.fellinger@] And that's why I use and love 1.9.
|   | 374274 [b.candler@po] Y'know, I wouldn't mind so much if it *always* raised an exception.
|   | 374278 [cmdjackryan@] Convert your strings to UTF-8 at all times, and you are done. You have
|   | + 374280 [james@gr ys ] easy
|   | | 374460 [drosihn@gm i] to stay out of it these days. =A0However, his arguments always strike me as=
|   | + 374281 [b.candler@po] But that basically is my point. In order to make your program
|   |   + 374284 [cremes.devli] [snipped lots of arguments about string encodings that may or may not be relevant to the OP]
|   |   + 374285 [ninja@sl ph ] And if you don't like Ruby's strings, there's nothing stopping you from
|   |   + 374287 [cmdjackryan@] s/apart from preventing Ruby from raising exceptions/but ensures
|   |   | 374293 [josh.cheek@g] Its wrongness is an interpretation (I would also prefer that it just break,
|   |   | 374294 [cmdjackryan@] It cannot be infinity. It does, quite literally not compute. There's
|   |   | + 374295 [josh.cheek@g] From my Calculus book (goo.gl/D7PoI)
|   |   | | 374308 [ninja@sl ph ] Specifically, the _limit_ is denoted as infinity, which is not a real number.
|   |   | + 374297 [yuri.tzara@g] It is perfectly reasonable, mathematically, to assign infinity to 1/0.
|   |   | + 374310 [e148759@bs o] This is not even wrong.
|   |   |   374335 [cmdjackryan@] For certain values of "definitive", anyway.
|   |   |   374362 [yuri.tzara@g] What psychological anomaly causes creationists keep saying that there
|   |   |   + 374364 [manuel@ki ss] Dear Yuri,
|   |   |   + 374365 [cmdjackryan@] I'm quite aware that IEEE 754 defines the result of x_0/0 as infinity.
|   |   |     + 374369 [spam.entfern] The point is that you can't guarantee that you has a 0 with floiting
|   |   |     | 374374 [cmdjackryan@] You can. In mathematics. The problem is, as you pointed out, that a 32
|   |   |     + 374373 [yuri.tzara@g] Yes, it is. The creationist analogy continues, I see. Even when given
|   |   |       374376 [cmdjackryan@] "Unlike most mathematical models of the intuitive concept of 'number',
|   |   |       374383 [yuri.tzara@g] Phillip, regarding defining 1/0 you said,
|   |   |       374385 [cmdjackryan@] Actually, they aren't I said for "x_0/0 the result is undefined", and
|   |   |       + 374386 [jos@ca no k.] This discussion has little to do with Ruby at this point. Maybe you folks
|   |   |       + 374414 [yuri.tzara@g] The big picture is that IEEE floating point is solidly grounded in
|   |   + 374332 [shortcutter@] This may be true for the western world but I believe I remember one of
|   |     + 374336 [cmdjackryan@] Since UTF-8 is a subset of UTF-16, which in turn is a subset of
|   |     | 374341 [shortcutter@] I tried to find more precise statement about this but did not really
|   |     | + 374347 [cmdjackryan@] Wester languages get the first 8 bits for encoding. Glyphs going
|   |     | | + 374352 [shortcutter@] What bits are you talking about here, bits of code points or bits in
|   |     | | + 374354 [james@gr ys ] You are confusing us.
|   |     | |   + 374360 [phil@pr co .] James,
|   |     | |   | + 374361 [shortcutter@] ode
|   |     | |   | + 374363 [james@gr ys ] "code points" - is what you have said expressed diagrammatically =
|   |     | |   + 374388 [no@sp m. le ] To add to this, Unicode 3 uses the codespace from 0 to 0x10FFFF (not 0xFFFFFFFF),
|   |     | |     374393 [james@gr ys ] string and step forward or back to the nearest character boundary - a =
|   |     | + 374356 [james@gr ys ] I believe you are referring to the complaints the Asian cultures =
|   |     | | 374357 [shortcutter@] s raise against Unicode. =A0If so, I'll try to recap the issues, as I under=
|   |     | + 374366 [spam.entfern] Yes this is correct. Many people don't get the difference between a
|   |     |   374370 [shortcutter@] Btw, this happens all the time: for example, people often do not grasp
|   |     |   374389 [no@sp m. le ] ... on a particular relativistic trajectory ;-) Seriously though,
|   |     + 374457 [b.candler@po] But that's not what Ruby does!.
|   + 374292 [ninja@sl ph ] In 1.8, if those strings aren't in the same encoding, it will blindly
|     374313 [Ruby@Go gl M] Actually, it's not. It's simply mathematically impossible, given that
|     + 374320 [james@gr ys ] And even UTF-32 would have the complications of "combining characters."
|     | 374372 [Ruby@Go gl M] .. and zero-width characters and different representations of the same
|     + 374394 [ninja@sl ph ] Whoops, my mistake. I guess now I'm confused as to why they went with UTF-1=
|       + 374406 [cmdjackryan@] Because that's how the other applications written on the mainframe the
|       | 374425 [ninja@sl ph ] In other words, not _quite_ greenfield, or at least, a somewhat different
|       | 374444 [cmdjackryan@] You don't expect anyone to throw their older mainframes away, do you? ;)
|       | 374448 [ninja@sl ph ] I suppose I expected people to be developing modern Linux apps that just
|       | 374452 [cmdjackryan@] Linux is usually not the OS the vendor supports. Keep in mind, a day
|       | 374462 [ninja@sl ph ] In other words, you need someone who will support it, and maybe someone who=
|       | 374470 [cmdjackryan@] Both, and the Linux variant you use has to be certified by the
|       | 374472 [ninja@sl ph ] Must be some specific legacy systems, because IBM does seem to be supporting,
|       | 374475 [cmdjackryan@] Oh, they do. But it's this specific Linux, and you get locked into it.
|       | 374488 [ninja@sl ph ] When I hear "mainframe", I think of a combination of hardware and software
|       | 374490 [cmdjackryan@] Since it is, technically, a standardized language, with defined
|       | 374521 [ninja@sl ph ] Sounds like we don't actually disagree.
|       | + 374526 [b.candler@po] * Operational. You have a whole workforce trained up to use
|       | | 374584 [ninja@sl ph ] This is what I was talking about, mostly. I'm not even talking about stuff
|       | | 374629 [b.candler@po] But rewriting COBOL in Perl may be a bad idea :-) Even rewriting it in
|       | + 374615 [cmdjackryan@] Because C-level execs working for any of the S&P 500 don't deal with
|       |   374679 [ninja@sl ph ] To do that effectively would require some understanding of these, however. In
|       |   374709 [cmdjackryan@] Ideally, yes. However, I contend that on the C-level with the size of
|       |   374755 [ninja@sl ph ] - Be actual generals with actual experience as colonels, majors, captains,
|       |   374757 [cmdjackryan@] ins,
|       + 374476 [shortcutter@] TF-16
|         374513 [shortcutter@] After reading http://tools.ietf.org/html/rfc2781#section-2.2 I am not
+ 374478 [wlinlin8899@] I know,I really LIKE THE GERMANY life,anyone is the same?
threads.html
top