386480-389874

386234-386970 subjects 386665-411894

Odd regexp behavior
386480 [damnbigman@g] I'm running 1.9.2-p180
+ 386482 [ryand-ruby@z] line
+ 386494 [bbxx789_05ss] It's pretty simple: $ matches before a newline--not the end of a string.
| 386496 [bbxx789_05ss] Actually, $ matches after a newline.
| 386497 [bbxx789_05ss] Whoops.
+ 386495 [bbxx789_05ss] /dualcredit/courses/general.php HTTP/1.1\" 200 27731 \"-\" \"msnbot/2.0b
+ 386498 [bbxx789_05ss] Also,
  386507 [damnbigman@g] Hmmm... maybe I should have posted from the beginning rather than where I
  386567 [damnbigman@g] ke
  386573 [phrogz@me co] ...
  386577 [damnbigman@g] Sure,
  386578 [matma.rex@gm] Because, when the (\s|$) at the end matches \s (a space), this space
  386583 [damnbigman@g] 2011/8/12 Bartosz Dziewoski <matma.rex@gmail.com>
  386589 [matma.rex@gm] I don't think I understand; "putting it back in" doesn't matter here,
  386590 [damnbigman@g] 2011/8/12 Bartosz Dziewoski <matma.rex@gmail.com>
  386591 [matma.rex@gm] The first one, (\s|$), is simply a group,  matching either whitespace,

regex position error
386481 [camargo.cr@g] Regexp.new(/^(\w+([-']\w+)*)(\ \w+([-']\w+)*)+$/)
+ 386483 [ryand-ruby@z] Regexp.new(regexp) is the same as regexp. Don't wrap in Regexp.new for =
| 386487 [luizluca@gm ] Dear Camargo,
+ 386604 [camargo.cr@g] /( |-|')( |-|')|^( |-|')|( |-|')$|^$|\d|[^a-z \-\']/i
+ 386613 [bbxx789_05ss] str = %Q[gisele !'_"9? bundchen]
+ 386614 [bbxx789_05ss] Whoops.

[ANN] flay 1.4.3 Released
386485 [ryand-ruby@z] flay version 1.4.3 has been released!

Re: flay 1.4.3 Released
386488 [axyd80@gm il] $ flay /Users/alex/projects/vfs/lib/vfs/**/*.rb
386490 [axyd80@gm il] just curious, according to power law

Supporting both ruby 1.8 and 1.9 in a compiled library
386499 [james.d.mast] I am a maintainer of the Ruby interface to a C++ library wrapped using
+ 386500 [hanmac@gm .d] the better way: build your *.so twice, one for each version and put the
+ 386513 [luislavena@g] Which provides what is called "fat-binaries" and version out the
+ 386525 [james.d.mast] Thanks for the responses so far.
+ 386526 [hanmac@gm .d] thats why gem is better, it manage that the stuff is installed into the
+ 386528 [ralf.mueller] I had a similar problem to solve in the CDI project: https://code.zmaw.de/projects/cdi. You can register

IO.read not working inside a win32-service
386501 [2006hz13084@] Encountered a strange phenomena with IO.read(IO methods) in a

Problems with Accent in Ruby 1.9+ (Latin Characters)
386502 [marcoflorian] First post here, thanks for the help.
+ 386503 [cmdjackryan@] The terminal used cannot display UTF-8 characters.
+ 386504 [regis.aubare] Your text is in US-ASCII.
| 386505 [cmdjackryan@] =ED isn't part of ASCII. ;)
+ 386520 [b.candler@po] Well, here it says the problem is in line 25 of main.rb. The screenshot
+ 386527 [regis.aubare] I think that Phillip Gawlowski  is right.
  + 386529 [luislavena@g] Have you tried running your script directly from the command line?
  + 386551 [b.candler@po] That's a *syntax error*, i.e. your program itself can't be parsed. In

Distributing Ruby program as a standalone executable (exe) for windows
386506 [michelle@mi ] I'm a newbie. I have written a ruby program on my mac which uses
+ 386508 [regis.aubare] I use OCRA under windows : "the One-Click Ruby Application Builder"
+ 386509 [matma.rex@gm] It is possible, using "Ocra" gem. (There are also some other ways, but
| 386670 [michelle@mi ] Perfect, thanks very much Bartosz and Regis.
| 386673 [sutniuq@gm .] As far as I know OCRA doesn't work on any other platform than Windows.
+ 386764 [rogerpack200] may be helpful to you.
| 386765 [jesmith2095@] Ocra is the key. I have used it with great success doing exactly what =
+ 389815 [khalid_mobar] I tried to use ocra myscript.rb under Windows XP
+ 389822 [shevegen@li ] Why it does not work on Linux?
+ 389874 [khalid_mobar] Am working in Windows XP.

1.9.3-preview1 & rake & Test::Unit
386510 [keltia@gm il] Is there something changed between 1.9.2 and 1.9.3-preview1 in
+ 386511 [mark@sc tt s] You might be interested in the workaround mentioned in this bug ticket
| 386514 [keltia@gm il] Indeed, workaround works, thanks!
+ 386538 [drbrain@se m] -I"/Volumes/Users/roberto/.rvm/gems/ruby-1.9.2-p290@ruby-1.9.2-p0/gems/rak=

puts 2 float value at one line
386515 [fantasyleagu] I want to print 2 float values which are separated by a space at one
+ 386516 [phrogz@me co] ...
| 386518 [b.candler@po] printf "%.1f %.1f\n", foo, bar
+ 386519 [fantasyleagu] thanks :)

RubyInline compile C with -m32 flag
386521 [jazminschroe] Is there a way to tell RubyInline to compile the C code using the -m32

parsing xml string into seprate line of string
386522 [saurabh_anan] Thanks for the help.
+ 386524 [matma.rex@gm] If you just want to split string by lines, abc.split(/\r?\n/) should
+ 386571 [thematrimix@] ...
+ 386572 [thematrimix@] ...

How do we fix gem permissions?
386530 [ninja@sl ph ] I just recently tried a system rvm installation, as I want to run some Ruby
386535 [drbrain@se m] process,=20

[ANN] rubygems-update 1.8.8 Released
386531 [drbrain@se m] * http://rubygems.org

[ANN] flog 2.5.2 Released
386532 [ryand-ruby@z] flog version 2.5.2 has been released!

Detriot.rb, Hello?
386533 [transfire@gm] Is anyone actively monitoring the Detroit.rb google group? (http://
386534 [cwprogram@li] While I'm not a member of the Detroit Ruby group, I did do a little =

[ANN] ZenTest 4.6.1 Released
386536 [ryand-ruby@z] ZenTest version 4.6.1 has been released!

[ANN] omnifocus-github 1.1.0 Released
386537 [ryand-ruby@z] omnifocus-github version 1.1.0 has been released!

Online tutor for Ruby
386539 [tj5155@tm ne] I am finding it difficult to apply the RUBY program. Its because i have
+ 386540 [allen.wyma@g] What's the rate?
| 386593 [tj5155@tm ne] Tq allen, send me you email and we can further talk about this.
+ 386541 [cmdjackryan@] Sometimes, the best things in life are free: http://ruby-kickstart.com/
| 386542 [cathy1428@gm] TJ
| + 386544 [cmdjackryan@] nted to
| | 386546 [cathy1428@gm] Hey ----> just checking
| + 386565 [rubfor@re it] All people who use Ruby are certifiable, if that helps.
|   386851 [spiralofhope] haha!  =)
+ 386564 [rubfor@re it] I would question your choice of Ruby. It's a very sophisticated
| 386566 [sophrinix@gm] From there  check out the book learn to program. I think it's published by
+ 386575 [thematrimix@] ...

Ruby Hpricot Rake
386543 [omkar.ghodge] I m new to ruby. What prompted me is the need for hpricot used for
386545 [cmdjackryan@] Install Ruby. Make sure it is added to your PATH (the installer will ask yo=
386696 [omkar.ghodge] Hey thnks a lot it worked.

Ruby Certification ( Was: Online tutor for Ruby )
386547 [cwprogram@li] wanted to
+ 386549 [cathy1428@gm] Actually, I have a cousin who hold either a Masters or PhD in CS.  His
| 386550 [cwprogram@li] certifications.  I
+ 386553 [josh.cheek@g] There is one here (http://www.ruby-assn.org/en/certification.htm) but it's
| 386559 [stefano.miol] That and a GitHub commit log, if at all available.
+ 386570 [code@ap th o] It's worse than that.  The moment certifications start becoming

how to remove weird chars in ruby/telnet output and log
386552 [jarodzz@gm i] tried google, didn't find any clue.

gem cleanup not working
386554 [michel@de az] 'gem cleanup' deletes one element, then fails. This can be repeated.
386555 [michel@de az] This has already been reported

I/O learning resource
386556 [aef1370@gm i] I want some learn about input data with keyboard. please help me and
+ 386557 [allen.wyma@g] Get and puts is the most basic. Run a google search on that.
+ 386558 [aef1370@gm i] For every human that work with computer , it is obvious  to go to search
  386560 [allen.wyma@g] Excuse me.  I'm guessing you're coming from a zero programming experience.
  386561 [josh.cheek@g] Variables that begin with capital letters are constants in Ruby. Probably
  386562 [allen.wyma@g] are

A Corresponding between C++ AND Ruby
386563 [amirhoo2008@] I am C++ programmer and in C++ I used some thing that I want
+ 386568 [mcpierce@gm ] sum =3D 0
+ 386569 [dave.baldwin] sum = 0
| 386576 [ninja@sl ph ] A nitpick: This doesn't do exactly the same thing. The 'cin' version, if I
| 386691 [shortcutter@] but
+ 386700 [bbxx789_05ss] sum = 0

Re: rubygems-update 1.8.8 Released
386574 [jon.forums@g] For those who have automated downloading and updating, it appears you're
+ 386579 [luislavena@g] 1.8.8 version is missing from both rubygems.org and rubyforge project
+ 386582 [drbrain@se m] you're

Jekyll RedCarpet New Block Syntax
386581 [transfire@gm] Anyone know how to get Jekyll, using RedCarpet, to handle the new

noob question - pattern matching
386584 [jb@je co .d ] I have a list of 22000 8 digit numbers. Im looking for a number which is
+ 386585 [zettabyte@gm] #!/usr/bin/env ruby
+ 386586 [phrogz@me co] ...
  386587 [phrogz@me co] ...

[ANN] RubyCSS
386588 [johnjohn.ted] I've been hacking at an interesting experiment using mxied in class

Stuck at an Issue with OptParse and File IO
386592 [idealone5@ho] i am picking default values that i am using in optparser class,
+ 386597 [bbxx789_05ss] require 'optparse'
+ 386602 [b.candler@po] That code wouldn't work, because you're using LOGFILE (in the first
  386619 [bbxx789_05ss] The nitwits there are the cause of the problem.
  386622 [b.candler@po] Ruby's documentation is often poor, but there's always the source code
  386657 [bbxx789_05ss] I thought I would show the op why they are having problems instead.
  386671 [idealone5@ho] Thanks U all for ur reply...actually that was part of code wht i

[ANN] graph 2.2.0 Released
386594 [ryand-ruby@z] graph version 2.2.0 has been released!
386674 [ralf.mueller] [ram@thingol:~/graph-2.2.0]rake
386675 [ryand-ruby@z] rake gallery
386676 [ralf.mueller] I love typos .... ;-(
386677 [ryand-ruby@z] writing you own graph library? I use it for representing source code =
386768 [anurag08priy] Which is the other graphing system that you are talking about? Just curious.
386773 [ryand@ze sp ] RGL existed back then (at least, according to rubyforge). If it did =

Re: RubyCSS
386596 [transfire@gm] it
386605 [johnjohn.ted] I was messing around with a base class initially, but then I also wanted to

How to get the Name of a Variable
386599 [mbmulder@on ] When I call a function with an argument, I want to retrieve the NAME of
+ 386600 [cwprogram@li] of
| 386601 [mbmulder@on ] I need it because I generate a complex data structure from more simple
| 386603 [shortcutter@] What exactly are "the desired results"?  Can you elaborate a bit more
| 386608 [matma.rex@gm] *Please*, for the sake of human sanity, *do not* use the following
| 386609 [luke.gru@gm ] I'll cheat by not using a closure... but here's what I came up with.
+ 386620 [bbxx789_05ss] That's beginning programming in any language.

c:\Ruby187\bin\ruby.exe: No such file or directory
386606 [abder.rahman] I have been running my Ruby program using the Git Bash console for a
386607 [abder.rahman] It seems that I had to explicitly save my ruby program with the

Fwd: Why this?
386610 [Godsent@ma l] ...
386621 [b.candler@po] Try looking at (a-b)

Re: why's (poignant) Guide to Ruby
386611 [bbxx789_05ss] That's beginning programming in any language.
386612 [bbxx789_05ss] Whoops.

Re: Why this?
386615 [johnjohn.ted] They are not numerically equal.
386616 [matma.rex@gm] For me, Math.hypot(10, 5)**2 is 125.00000000000001.
386618 [cmdicely@gm ] The second result is the version of "inspect" bundled with your ruby

Getting information from keyboard
386623 [aef1370@gm i] I am reading a book about ruby, it learn me that I write my program in
+ 386624 [josh.cheek@g] Back when I used SciTE, it didn't have anyway for you to pass data to
+ 386625 [jakekaiden@y] i use SciTe regularly, and like it a lot, but unfortunately #gets will
| 386633 [stefan@ma li] It is hard to find, but possible to enter data from stdin
| 386668 [jakekaiden@y] i'd be very interested to know how this has worked for you...  when i
+ 386626 [aef1370@gm i] please explain me more obvious.
+ 386630 [jakekaiden@y] SciTE is great for its highlighting, and the fact that you can run
+ 386635 [aef1370@gm i] I have a problem with ruby documentation , I mean that I don't
| 386640 [matma.rex@gm] IO.open(fd, mode_string="r" [, opt] ) вк io
+ 386641 [aef1370@gm i] Bartosz Dziewoski , I am very thankful from you. but I have anotherquestion I don't understand exactly what is the [,opt] and how can I use that ?
  386645 [matma.rex@gm] The square brackets are there simply to indicate this is an optional argument.

Problem with Files
386627 [aef1370@gm i] File.open("a.txt")do |i|
+ 386628 [johnjohn.ted] ...
| 386629 [johnjohn.ted] Accidentally hit "Send".
+ 386642 [josh.cheek@g] The first version, File.open will open the file, then pass it into the

How to use "case" to match class names? (=== not so funny)
386631 [ibc@al ax ne] klass = String
+ 386632 [matma.rex@gm] I don't think there's a better solution than what you already have.
| 386634 [ibc@al ax ne] I need "klass" to hold a class name, not an instance. That cannot be changed.
+ 386636 [cwprogram@li] Correct, because triple equals checks to see if the value is an instance =
| + 386638 [ibc@al ax ne] Really great, thanks a lot.
| + 386678 [ryand-ruby@z] def === o
+ 386679 [ryand-ruby@z] case
| 386681 [ibc@al ax ne] The most ellegant way. Thanks.
+ 386682 [b.candler@po] As you've found, Class#=== tells you if an object in an instance ofa class

class inheritance and class constants
386637 [ibc@al ax ne] class A
+ 386639 [cwprogram@li] Correct, since the method is being called in the context of A, it will =
| 386648 [ibc@al ax ne] class Server
| + 386650 [cmdjackryan@] What about Modules?
| | 386651 [ibc@al ax ne] module M
| + 386652 [cwprogram@li] defined in B instead
|   386654 [ibc@al ax ne] (i.e. UdpServer, TcpServer) has different attributes (listenting IP,
|   386656 [cwprogram@li] you can override the Server listen and still call its core functionality =
|   386658 [ibc@al ax ne] Yes, I also us that commonly. However I didn't know that class
|   386659 [cwprogram@li] Yup, and the reason why it works is because class definitions are =
+ 386653 [shevegen@li ] Does Ruby violate the DRY principle here?
+ 386660 [phrogz@me co] class A
| 386663 [matma.rex@gm] I may be late to the party, since it seems like you've already solved
| 386664 [ibc@al ax ne] Thanks, but I don't think that mechanism is as efficient as using
+ 386684 [b.candler@po] Change
  386685 [ibc@al ax ne] Yes, I've also used this mechanism (self.class::HELLO). And also using

Unwanted scan() method behavior
386643 [ml@co va es ] Greeting to everyone from Greece!
+ 386646 [matma.rex@gm] Did you mean to use log.scan(/<snip>/).each{} instead of
| 386647 [matma.rex@gm] I re-read your mail and realized that I don't really understand what
| 386649 [ml@co va es ] Thanks for reply,
+ 386655 [g.diemant@gm] I would say, you should only call
  386666 [ml@co va es ] I had the feeling that it was something that obvious that I'm missing but I focused so much on the function that I missed it!
  386690 [shortcutter@] o be
  386715 [ml@co va es ] Thanks for the pointers Robert! I'll do some checks and probably implement your solution which seems more appropriate,

SFTP grep on foreach
386662 [sonke@we pe ] I got
+ 386669 [bbxx789_05ss] sftp.dir.foreach("/path/to/directory") do |entry|
| 386692 [sonke@we pe ] I kind of do that already.
+ 386695 [brabuhr@gm i] (with a "scary" disclaimer: "don=91t expect this method to perform with
+ 386697 [sonke@we pe ] Hey,
+ 387559 [axyd80@gm il] There's a tiny wrapper over Net::SFTP that makes it as simple as this
threads.html
top