359296-378362

359114-398748 subjects 359509-361602

C embedding problem with 1.9
359296 [neiger@lo ia] I can't manage to make the attached program to work with ruby 1.9.
359297 [neiger@lo ia] It seems that using a global variable by adding $ before the 'a'
359304 [neiger@lo ia] undefined method `synchronize' for #<Mutex:0x83b858c>

Help with Class definition and calling a Ruby Program
359310 [raperswil@gm] All
+ 359313 [aldric@tr vo] [ .............]
+ 359317 [s.korteling@] Don't use a capitalized method name (see Aldric's suggestion); only
  359379 [jgabrielygal] Putting together the previous two suggestions, if you call your script

Version issues
359319 [cluny_gissla] I am using ruby 1.8.6 and I have been having some problem using certain
+ 359322 [brabuhr@gm i] Please provide a short example of the code you are trying and the
+ 359329 [ryand-ruby@z] On Mar 19, 2010, at 3:11 PM, David Vlad <cluny_gisslaren@hotmail.com>
| 359330 [cluny_gissla] I apologize. I actually managed to get the until loops working after
| + 359332 [ryand-ruby@z] % ri Array.collect
| | 359333 [cluny_gissla] I know what it does, but still it dosnt work.
| | + 359358 [sepp2k@go gl] The behavior of the code you posted is entirely consistent with
| | | 359359 [cluny_gissla] Im so sorry, I have misunderstood everything. I thought it was supposed
| | | 359361 [gf.bozzetti@] array = [1,3,7,8]
| | | 359364 [sepp2k@go gl] array # => [2,6,14,16]
| | + 359370 [ryand@ze sp ] You seem to be missing the big clue: "CREATES A NEW ARRAY"
| + 359357 [wruyahoo05@c] "array.collect " isn't supposed to modify array.
+ 359353 [luislavena@g] Please show a code example, the output you're getting and the exact

Problems with Web Services
359320 [cnjbravo@ya ] I'm doing a Web Services using SOAP, but when I click a button, the

[QUIZ] The Matrix: Code Screen (#230)
359327 [yahivin@gm i] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Help installing rubysdl gem
359331 [venkatram.ak] I am trying to install rubysdl gem on 1.9.1p243. I have tried to
+ 359514 [venkatram.ak] Any Help!
+ 359515 [billk@ct .c ] Which version of SDL is installed on your system?
  359516 [venkatram.ak] Thanks for the reply.
  359517 [billk@ct .c ] My understanding is that SDL 1.3 is still evolving
  359519 [venkatram.ak] Thanks Bill

Question about the evaluation of  x = 'foo' if false
359334 [anibalrojas@] irb(main):001:0>  x =3D 'foo' if false
+ 359335 [chris.hulan@] See http://www.ruby-doc.org/docs/ProgrammingRuby/html/tut_expressions.html#=
+ 359336 [mark@th ma z] Another way to think about it is that the above constructs are
  359340 [anibalrojas@] Thanks for your responses!

Extending RDoc ( or Yard )
359344 [bradphelan@g] I'm using the excelent CouchRest gem and I would like to document my
+ 359360 [transfire@gm] ...
+ 359369 [ryand-ruby@z] It already works. Put "##" on a line before your rdoc and it'll get =
  359661 [bradphelan@g] d up.

Ruby sound library RUDL and ruby 1.9
359347 [qrprat77@gm ] I am trying to obtain a sound library so I can write morse code practice
+ 359352 [h.bekel@go g] See http://aur.archlinux.org/packages.php?ID=24767
+ 359449 [headius@he d] There's a full set of sound libraries shipped with every Java runtime,

Living with a Swarm of Boids - A report from the front
359354 [gmkoller@gm ] Haven't checked in for awhile...  thanks, guys,  for the info from
+ 359362 [gmkoller@gm ] I did a little arithmetic after sending my note off early this AM  and
| 359365 [gmkoller@gm ] Whoops!
+ 359375 [shortcutter@] Actually from what you've written your design (or the core idea behind
| 359418 [gmkoller@gm ] Robert,
| + 359432 [phil@pr co .] Thunk,
| | 359433 [gmkoller@gm ] to
| | 359439 [phil@pr co .] Thunk,
| + 359434 [ryand-ruby@z] How can we give you that? You're rambling here on and on about something =
| | 359435 [gmkoller@gm ] you've already said we'll never see.
| | + 359440 [ehsanul_g3@h] ...
| | + 359446 [ryand-ruby@z] "extreme
| + 359450 [shortcutter@] Since I still haven't grasped what your project is all about I can't
|   359461 [aldric@tr vo] I remember him posting about this a while back, but that's all. Maybe
+ 359442 [dido.sevilla] Note that you haven't even bothered to define what the heck a 'boid'

[ANN] Kanocc 0.2.0
359366 [christian@su] Kanocc (Kanocc Ain't NO Compiler-Compiler) 0.2.0 is released.
359367 [ehsanul_g3@h] ...
359387 [tomonacci@gm] Kanocc uses Earley parsing algorithm, while Treetop uses PEGs.
359406 [christian@su] Well, actually I didn't know about Treetop. It looks very nice. I'll have a

Modifying Select Elements in Array of Objects
359374 [glenn_ritz@y] I have an array of objects, and the objects have some attributes.  I'd
+ 359376 [phrogz@ma .c] See Array#select and Array#find.
+ 359377 [shortcutter@] There is a different way but it's not really better because now you
  359382 [glenn_ritz@y] Thanks, guys.  This helped.

ops.epo.org hacks (was: Wsdl -  Webservice Client)
359378 [mike@os n. r] ...

Hash#hash and detecting changes?
359385 [space.ship.t] I am writing a Rack session class. I want to detect changes to the =
359396 [walton@vy er] From http://ruby-doc.org/core/classes/Hash.html#M002847
359397 [walton@vy er] Sorry for all the URLs, I just blindly pasted from my browser, not
359409 [walton@vy er] ^^^  I give up, Thunderbird, you win.

A plugin system using extend
359388 [jd@va gu t. ] I tried to design a simple plugin system using :extend called upon
+ 359389 [space.ship.t] /index
+ 359394 [josh.cheek@g] the object to extend. http://gist.github.com/339101
  359398 [jd@va gu t. ] just fine as long as what you're redefining belongs to the Base::Server
  359402 [jd@va gu t. ] - any loaded lugin registers as a "callback" for the classes it wants to
  359410 [james@gr ys ] to=20
  + 359411 [jd@va gu t. ] Thank you for this feedback. You understood well I guess. This is good
  | 359412 [james@gr ys ] behavior as=20
  | 359425 [jd@va gu t. ] Thank you, this is art. I'm happy to see I did it roughly the same way,
  + 359414 [shortcutter@] James, what's the advantage of this over simply using "include"?  If all
    + 359416 [james@gr ys ] wants to alter (instances of the classes, actually!);
    + 359421 [jd@va gu t. ] As JEGII stated, the main reason to do so is related to the inheritance
      359424 [james@gr ys ] as=20
      359426 [jd@va gu t. ] That's even better than expected! I did not think about the singleton
      359444 [jd@va gu t. ] I just finished writing my plugins system. It's working like a charm,
      359717 [jd@va gu t. ] I encounter a little issue while trying to make it really dynamic.
      359722 [jd@va gu t. ] Fixed, although I don't really understand *why* at the moment :)

Ruby/Tk: How to colorize a Treeview?
359392 [albertschlef] I have an item in my Treeview that I want to highlight. I have this
359427 [nagai@ai ky ] Please try "tree.tag_configure('important', :background => 'yellow')".
359488 [albertschlef] Thanks. Upgrading Ruby/Tk isn't a viable solution for me because I can't

Local gems not loaded in ruby > 1.9 without custom_require
359399 [bterkuile@gm] I have a Kubuntu 9.10 64bit installation. I run ruby 1.8.7 and 1.9.1

Speeding up TCP
359413 [sean_warburt] I have a script that opens a TCP socket and then sends an XML request
+ 359415 [cremes.devli] Show us your code. It's impossible to say that the performance issue is with network and not with other processing you are performing on the data from what little you've said.
| 359429 [brabuhr@gm i] 130ms from the same client to the same server over the same network?
+ 359448 [b.candler@po] Show your code as others have said. Using tcpdump or wireshark, measure
+ 359589 [rogerpack200] using eventmachine might help.
  359622 [gethemant@gm] Try disabling naggle algorithm.

LAN inventory
359419 [bigthepaco@g] I'd like monitor hardware and software: check hardware configuration,
359428 [brabuhr@gm i] I've not had an opportunity to use them, but Ruby does have libraries
359583 [bigthepaco@g] Ok, thank you. I try to simplify. Initially I'd like develop a script
359745 [brabuhr@gm i] rpcclient -S nt_server -W domain_name -U username

Reading contents of all files from a Directory
359420 [blackhawk_93] I am new to Ruby.
359422 [jonathan@jm ] You've got a good start there.  As you have already figured out, the
+ 359423 [jonathan@jm ] Wow, I typoed that bad, but I hope you get the idea.  (corrected above.)
| 359464 [shortcutter@] puts Dir["K:/test/*"].map {|f| File.read f}
| + 359466 [  jbw@jb .c ] puts Dir["/*"].map { |f| if(!File.directory?(f)) then File.read f end }
| | 359469 [shortcutter@] Good point!
| + 360368 [blackhawk_93] Many Thanks for replying robert, I am trying to print the contents of
|   + 360369 [aurelien.ami] First you should use file wich contain the filename of your file instead of
|   | 360371 [blackhawk_93] Thanks for replying , if I do
|   + 360370 [jgabrielygal] You have two errors there. "file" is a literal string, not the
|     360373 [blackhawk_93] Thanks for replying ,when I am doing
|     360374 [hassan.schro] Is there a reason you don't think it means exactly what it says?
|     360375 [blackhawk_93] No doubt, the error message is self explanatory.
|     + 360376 [hassan.schro] But what about the permissions of the directory, and of the directory
|     + 360377 [shortcutter@] Your error is most likely caused by the fact that Dir#entries returns
|       360380 [blackhawk_93] Many Thanks for replying robert, It makes sense what you have said.
|       360382 [shortcutter@] You should close the Dir object properly.  You can either use the block
|       360383 [shortcutter@] Even better
|       360385 [blackhawk_93] Many Thanks Robert, I did the following,
|       + 360388 [jgabrielygal] file.foreachline {|line| print line}
|       + 360389 [shortcutter@] Are you sure?
|         360433 [blackhawk_93] All works , Thanks very much!
+ 359529 [blackhawk_93] Posted via http://www.ruby-forum.com/.

A humble start on a Boid System Vocabulary -
359430 [gmkoller@gm ] I just took a crisp spring bike ride to our coast guard station and

A regexp?
359436 [derekbellner] Thank you in advance! :)
359437 [brabuhr@gm i] S+)\s+(.+)$/).first)
359489 [derekbellner] I don't see your working regexp on this page.  I tested the regexp

IPv6 multicast server/client
359438 [ravenz@o2 ie] i'm writing as subject to know if someone can give me some
359588 [rogerpack200] I've seen snippets for ipv4 around, but you're probably trodding new

[ANN] Dfect 2.0.0 (2010-03-21)
359441 [sunaku@gm il] Dfect 2.0.0 (2010-03-21)

Decompressing LZW compression from PDF file
359443 [ahmad.azizan] I'm trying to find a ruby module/code that can decompress
+ 359445 [ryand-ruby@z] output
+ 359451 [b.candler@po] Which version of ruby are you using? If it's 1.9 then your @fp[@inc] may

super
359447 [rahimabanu26] ;;;;;;;;;;;;;;;;;;;;

Ruby Manor: Manor Harder - videos now online
359452 [james@la ya ] Thanks to the herculean efforts of Murray and Final Cut Pro, we now have

Boids, a use case
359454 [gmkoller@gm ] Guys,
+ 359455 [gmkoller@gm ] I've got a lot of serious work to get done, and based on everything
+ 359456 [peterhickman] Sorry still no clearer as to what you are talking about.
  359457 [robert.dober] ave
  359458 [peterhickman] The OP is displaying an excellent command of English and that is good enough
  359459 [peterhickman] Sorry I don't know why Gmail is posting things twice
  359460 [josh.cheek@g] Gmail shows you your post in a thread. The mailing list sends everyone on

Any idea of SciTE-ru supporting ruby?
359467 [rollingwoods] SciTE-ru is a custom version of SciTE developed by Russian developer.
+ 359539 [kyleaschmitt] Umm.  Dude, SciTE supports ruby pretty darned well already.  So well
+ 359578 [rahegge@gm i] It does support ruby, but by default, its not a language on the Language
| 359733 [rollingwoods] Exactly works as instruction!!!
+ 378362 [michelle@mi ] In summary of the above, and with addition of one more change - to get

Reverting date from Time.to_s
359470 [utsavgupta89] I receive the dates from Twitter in the following format "Mon Mar 22
359472 [cremes.devli] Quite simple.

Sorting keys of hash based on value
359471 [aldric@tr vo] hash = {:a => {:happy => 5},
359475 [rikiji@pl yk] Do you want keys or the whole hash?
359477 [aldric@tr vo] Of course.. I was trying to make it too complicated. Thanks!
359479 [Rob@Ag le on] Or the slightly simpler sort_by
359482 [shortcutter@] hash.sort_by {|k,v| -v[:happy]}.map(&:first)

splitting text string
359473 [xman2001@gm ] I am working on a way to process the status of products and I want to
359474 [jonathan@jm ] ~$ irb
359476 [joelvanderwe] $ irb -r scanf
+ 359483 [b.candler@po] raise "Bad barcode" unless "123456789" =~ /\A(\d{3})(\d{5})(\d)\z/
+ 359484 [s.korteling@] "123456789".unpack("A3A5A1")

Google Summer of Code
359480 [dsisnero@gm ] I didn't see very many ruby * mentor organizations *for the Google Summer of
359481 [dblack@ru yp] Ruby Central was not selected for 2009. We didn't apply this year. Our

Callbacks when deleting self-referenced has_many?
359485 [svoop@de ir ] I've come across a behavior which doesn't seem to be consistent. Let's
359518 [svoop@de ir ] Figured it out, I should be using the association callbacks. For some

Help me plan my Ruby app :)
359491 [abaranosky@h] So I am interested in writing a program to read a file I write, with
+ 359492 [christoph.ja] consider using sinatra / padrino which are tiny ruby web frameworks. Your
| 359495 [abaranosky@h] Hey Thanks Christopher,
+ 359493 [ben@bl yt in] Neat!
  359497 [abaranosky@h] Oh thanks for the ideas Ben,
  359498 [ben@bl yt in] I'm sure there's a native alternative to cron, but I have no idea what
  + 359504 [Ruby@Go gl M] Task Scheduler, managed through the schtasks.exe command. Something
  | 359690 [abaranosky@h] Very useful jwm, thanks.
  | 359694 [abaranosky@h] So this is what I'm doing so far.
  | 359756 [abaranosky@h] So the next step for me is figuring out how to send emails from an
  | 359913 [abaranosky@h] So guys,
  | 359916 [abaranosky@h] Does rubyw only work with 1.9?  I switched to using just ruby and it
  + 359505 [walton@vy er] Scheduled tasks in XP/2003.  Task Scheduler in Vista and newer.  I agree

less than sign for inheritance in classes
359494 [deepikarohit] Where in Ruby is the less than sign for inheritance in classes defined?
359500 [gwtmp01@ma .] I'm not sure if I understand your question, but '<' is just syntax when
359501 [deepikarohit] Every operator is a method in ruby....
+ 359502 [albertschlef] And is the "=" too a method? Can you redefine it?
+ 359506 [gwtmp01@ma .] Let me try again.  The '<' in a class definition
  359528 [deepikarohit] Thanks. But in that case where is the < handled to identify
  359531 [Rob@Ag le on] That would be deep inside parse.y -- the grammar file for the parser.

Module A extends Moudle B possible?
359496 [deepikarohit] Can Modules extends within themselves?
359546 [shortcutter@] irb(main):001:0> module A; end
+ 359547 [deepikarohit] Thanks robert.
+ 359548 [vikkous@gm i] irb(main):001:0> module A; end
  + 359549 [deepikarohit] In the end, I wanted to see A as ancestor of B.
  | 359551 [vikkous@gm i] So, then, you should use include, I think. It's like inheiritance, but
  + 359566 [shortcutter@] *I* am the one missing something.  I had this nagging feeling that

Persistent Instance Vars on Soap Server.
359499 [ober@li bs .] I have code at http://mauthesis.com/test.rb=20

what's the matter with my programm:Web Analysis
359503 [myocean135@y] HTMLRegexp =/(<!--.*?--\s*>)|
+ 359511 [thopre@gm il] it's __END__ not _END_
| 359523 [myocean135@y] i change   _END_  into   __END__  ,it's no use.
| + 359526 [thopre@gm il] please  run it on your computer to see what happen,think you
| + 359534 [b.candler@po] z.rb:11: undefined method `elseif' for main:Object (NoMethodError)
+ 359540 [glennj@nc .c] Please consider using a real HTML parser, such as Nokogiri
  359552 [myocean135@y] 1???it's __END__ not _END_
  359554 [josh.cheek@g] It works for me on 1.8.6, 1.8.7, and 1.9.1
  359555 [myocean135@y] i reopen my computer ,run the script,get the correct answer
  359556 [josh.cheek@g] Scan docs are here (this is 1.8.6)

[ANN] Rumai 3.2.1 (2010-03-22)
359507 [sunaku@gm il] Rumai 3.2.1 (2010-03-22)
threads.html
top