313480-313887

313283-314071 subjects 313716-334446

^ How to replace a string with given pattern?
313480 [youhaodeyi g] I want to replace a string with the new value on a given regular
+ 313482 [shortcutter ] Please look it up in the docs
+ 313485 [wieczo.yo go] "HHello".gsub(/H/, "h")
| 313491 [youhaodeyi g] ok thanks.
+ 313488 [sepp2k googl] String#gsub (which is in the docs, btw)

^ arrays, difference of operation...
313495 [kathe.mayure] I tried the following;
+ 313497 [tpreal gmail] Your confussion comes from the fact that you assume that [] means an
+ 313500 [sepp2k googl] No, it's not. ["a", "b", "c"] is an array containing characters. "hello

^ string, adding a numeric value to a part
313507 [kathe.mayure] Suppose there's a variable called 'a' with a value = 1.
313508 [tpreal gmail] Inside #{} you can put whatever you want. "#{a+1} is really two".
313518 [shortcutter ] irb(main):012:0> s = "1 is really two"

^ Parsing a CSV file column-wise
313516 [chris.lowis ] Is there a short-cut to parsing a CSV file column-wise using any of
+ 313517 [jgabrielygal] irb(main):001:0> [["1", "2", "3"], ["4", "5", "6"], ["7", "8",
+ 313548 [james graypr] #!/usr/bin/env ruby -wKU
| + 313666 [lloyd 2live4] I always enjoy your posts.  :)
| | 313667 [james graypr] Thanks.
| + 313813 [chris.lowis ] Thank you for your help James, I'm sorry - I hadn't noticed your replies
+ 313610 [Lars.Broecke] Take a look at FasterCSV. It is available via rubygems and allows
| 313614 [chris.lowis ] On Sep 2, 8:34=A0am, Lars Broecker <Lars.Broec...@iais.fraunhofer.de>
| 313653 [james graypr] #!/usr/bin/env ruby -wKU
+ 313717 [w_a_x_man ya] [["1", "2", "3"], ["4", "5", "6"], ["7", "8", "9"]].transpose
  + 313749 [chris.lowis ] That's a very simple way to achieve what I want  - thank you !
  + 313861 [ara.t.howard] clever.  thx.

^ accessing instance variable
313521 [kathe.mayure] I did the following;
+ 313522 [shortcutter ] You are not defining an instance variable of instances of O here but
| 313529 [tpreal gmail] Exactly. And if you want to initialize @b for each new instance of O to
| 313530 [monojohnny g] c = o.b
+ 313540 [vlonline 126] To access instance variable, you need to define attribute

^ gsub html sanitizer
313523 [marikoc gmai] I'm new to Ruby and a bit confused about how gsub works. I've read the
+ 313524 [monojohnny g] You could just chain this up to make it neater?
| 313525 [monojohnny g] [TYPO correction: I didn't mean to quote 'method' in my reply...I was in
+ 313526 [shortcutter ] irb(main):004:0> replacements =
+ 313527 [jgabrielygal] If you don't mind a loop, you could gsub each pattern one at a time.
  313528 [marikoc gmai] Thanks everyone for the replies. They were extremely useful.

^ Ruby, GUI and Flex
313531 [jsnit jsnit.] is there a way to use a Flex GUI interface?
+ 313546 [mguterl gmai] These are two options for Rails...  I have used RubyAMF in some
+ 313556 [lucevers gma] class WeborbController < ApplicationController
  313584 [huw darkneon] My examples show the Flex Builder and Ruby In Steel IDEs but you can

^ Undo Object.extend
313532 [joseignacio.] I'm trying to change the behaviour of a specific instance at runtime.
313567 [robert.dober] Maybe you want to use pushable behavior
313581 [joseignacio.] Thanks, that's a really nice piece of code that helps a lot :)
313627 [robert.dober] Good question ;). Actually I am leaving empty modules on the stack
313636 [joseignacio.] I've modified my version by getting inspired by your code :)
313649 [robert.dober] That might be a feature or a bug, when pushing behavior dynamically
313665 [joseignacio.] I think you're right, after reviewing what Why points out at
313669 [joseignacio.] require 'benchmark'

^ Ruby SVN repo?
313533 [tpreal gmail] but I seem to fail to find any official info. Is the Ruby core SVN repo
313534 [wieczo.yo go] ...

^ Checking for 'nil' Class (not instance) variables?
313536 [monojohnny g] See below, what's the proper way of checking for initialized
+ 313537 [dblack rubyp] defined?(@@nosuchvar)
| + 313538 [monojohnny g] Thanks !
| + 313539 [shortcutter ] You forgot the disclaimer that class variables are fragile and should
|   313542 [monojohnny g] //
+ 313541 [sepp2k googl] =3D> nil
+ 313545 [vlonline 126] Well, to query about class variables/methods, I would prefer to use

^ Core Date or no Date?
313543 [transfire gm] Is there a core Date class or not?
313547 [james graypr] No.

^ a system call during gem installation?
313544 [aidy.lewis g] Is it possibe to create a gem package that could include a system call

^ included() vs extended()
313550 [jcoglan goog] Not sure if I should be asking this on the core list instead, but... I've a
313558 [lunatyq smis] In ruby everything is an object. So even class is an object.
313568 [dblack rubyp] include and extend both do the same thing: they add a module to the
313578 [lunatyq smis] I have used bad words and only messed up stuff.

^ Regex help, anyone?
313554 [c00lryguy gm] I'm making a syntax highlighter for ruby and i just need help with a bit
+ 313555 [fophillips f] "def foo(bar, baz)".scan(/def (\w+)/) =3D> =3D> [["foo"]]
+ 313572 [TimHunter nc] Here's my stab at it.

^ Trouble with YAML::load
313559 [p.brian.ross] I am still working through Beginning Ruby - From Novice to Professional and
313560 [transfire gm] nd
313564 [p.brian.ross] Thanks!

^ Tk questions
313566 [kenneth.m.mc] In "bind_remove_all" (and many other commands), what is the required
313577 [nagai ai.kyu] Please give an event sequence (see also Tcl/Tk's "bind" manual).
313596 [kenneth.m.mc] Thanks. In English terms, 'context' isn't quite the right word for
313600 [nagai ai.kyu] I think so too. :-)

^ web widget concept, how does it work?
313569 [h4lfl1ng inb] I want to start a simple web project, a small web widget that users with
+ 313638 [monojohnny g] Posted via http://www.ruby-forum.com/.
| 313670 [h4lfl1ng inb] Well from all those links the most they tell me is what a widget is,
+ 313668 [lloyd 2live4] Are widgets still worthwhile?
  313671 [h4lfl1ng inb] My reasons behind making a widget isnt to push something, but to help a user

^ [ANN/PIMP] Ruby Certificate Program @ University of Washington This Fall
313570 [ryand zenspi] **It is that time of year again!** (yes, I'm a bit late posting this)

^ rb_require() causes segfault
313571 [lists bertra] calling rb_require() with a file name that will not be found,
+ 313598 [lists bertra] I'm still about to convince my colleagues that Ruby is the
+ 313632 [lists bertra] OK, I start to debug it.
  313696 [lists bertra] I just debugged into the JUMP_TAG() macro. Indeed the `prot_tag'
  313715 [nobu ruby-la] No thank you.
  313747 [lists bertra] Sorry. I was just irritated about getting absolutely no answer on

^ Re: [QUIZ][SOLUTION][UPDATE] Where the Required Things Are (#175)
313573 [jens.wille u] <http://github.com/blackwinter/scratch/commit/60eb300>

^ Stripping non alphanumeric characters
313574 [bjohnson con] I know this is a noob question. What would be the best / most efficient
313575 [TimHunter nc] you didn't say what you want to replace them *with*. Here I assumed you
313576 [bjohnson con] You're the man, thanks.

^ Command to clean the screen in IRB? (like when pressing "Ctrl+L")
313579 [ibc aliax.ne] in=20

^ Re: Command to clean the screen in IRB? (like when pressing "Ctrl+L")  [SOLVED]
313580 [ibc aliax.ne] Well, after looking I've found that there is not such command, but some=20

^ Self and Current Class
313582 [ei04065 gmai] I know that Ruby always keeps track of two concepts: self and current
313587 [tpreal gmail] Well, at first I thought that you can always check the current class
+ 313612 [ei04065 gmai] Thomas, thanks for your reply.
| + 313616 [dblack rubyp] That's not a class method. self is an instance of SomeClass; you're
| | 313620 [ei04065 gmai] If forgot to change the text, I mean't singleton method. Thanks for
| + 313621 [tpreal gmail] For me, your diagram is perfectly correct (however I had some doubts at
|   313634 [dblack rubyp] It's a keyword.
+ 313617 [dblack rubyp] I don't think so. Most of the time you're likely to be inside a method
  313623 [tpreal gmail] You're right. That was my sort of inaccurate concept.
  313679 [vjoel path.b] $ cat foo.rb

^ Re: Where the Required Things Are (#175)
313585 [reitinge in.] ~$ ruby modwhich.rb date set bigdecimal
313593 [matthew.moss] You're not the first person to say that.
313599 [erik hollens] module Kernel

^ Most elegant way to 'reroute' Text widget events?
313597 [kenneth.m.mc] After a couple of unsuccessful experiments, I'm afraid it's time to
313601 [nagai ai.kyu] Probably, the most simple way is
313603 [kenneth.m.mc] Thanks for all your help, it's been great. I would never have figured

^ [ANN] rubylexer 0.7.1 Released
313602 [vikkous gmai] rubylexer version 0.7.1 has been released!

^ how can I exit with a message in ruby?
313604 [etaern yahoo] does ruby have a die method ? or is it there a method that displays a
+ 313605 [jgabrielygal] Kernel#at_exit
+ 313606 [billk cts.co] abort "bye..."
  313609 [etaern yahoo] Thanks Bill , just what I was looking for .

^ Open3 and ssh
313607 [unbewusst.se] I'm writing an app using RubyCocoa on MacOS X 10.4.11 which i want to
313692 [B.Candler po] I think your problem is that the -T option explicitly *prevents* the far end

^ inline double quotes
313608 [johdax gmail] i'm searching for a way to remove inline double quotes in ruby,
313611 [tpreal gmail] Your csv is malformed if it has such quotes, so there is no standard way

^ escaping '
313613 [pppswing yah] I need to replace ' by \'. How can I do that?
313618 [monojohnny g] 1,$ s/'/\\'/g
313626 [botp delmont] RnJvbTogSm9obiBQcml0Y2hhcmQtd2lsbGlhbXMgW21haWx0bzptb25vam9obm55QGdvb2dsZW1h
313646 [monojohnny g] //how i wish the behaviour would change.

^ compiler for gems
313615 [milchshake g] How can I define, which c-compiler should be used installing gems with
+ 313651 [TimHunter nc] By default it's the same compiler that you used to compile Ruby.
+ 313721 [rogerpack200] I know that by default with mingw it'll use what the first "make" and/or

^ Does this seem useful for you?
313624 [robert.dober] class Object
+ 313628 [jens.wille u] <http://prometheus.rubyforge.org/ruby-nuggets/classes/Object.html#M000078>
| 313631 [robert.dober] Hmm maybe like this
| + 313639 [jens.wille u] done. more or less ;-) i kept hashes, since i sometimes like 'em
| | 313652 [robert.dober] Although is_a? is more readable the #=== operator is a very powerful
| | 313659 [jens.wille u] FULL ACK up to this point.
| + 313655 [ei04065 gmai] At least in Ruby 1.8.6 (the version I've installed) you dont need to
+ 313630 [jcoglan goog] 2008/9/2 Robert Dober <robert.dober@gmail.com>
+ 313633 [botp delmont] # class Object

^ Record cannot be saved
313625 [rasfast gmai] Maybe a noob question, sorry, but I'm really stuck with this.
313629 [rasfast gmai] 1. I have another models in my application, and all of them are saved

^ air max,af1,dunk sb
313635 [chinawholesa] [url=http://www.chinawholesaling.com/productlist.asp?

^ Ruby doesn't need equal's signs for assigment?
313640 [form awebabo] I'm new to Ruby... do you need ='s signs for assigment?
+ 313642 [shortcutter ] I can confirm that there are no equal signs in the code. ;-)
| 313644 [form awebabo] OHHHHHHH!!! DUH!  Thanks so much!
| 313742 [davebass mus] Some people don't like parentheses. Personally I use them abundantly
+ 313643 [jcoglan goog] You need = signs for assignment. In ActionMailer those are implemented as

^ finding blocks in black-and-white images (efficiently)
313648 [AEtzold gmx.] Dear all,
+ 313674 [TimHunter nc] I took the liberty of posting your question to the ImageMagick forum
+ 313675 [ara.t.howard] 196
+ 313859 [TimHunter nc] If this is something you want to pursue let me know and we can work on
  313868 [AEtzold gmx.] Dear Tim,
  313876 [TimHunter nc] Okay, I'll see what I can do. I'll follow up with you directly. I'm
  313881 [AEtzold gmx.] Tim,

^ About class variable question?
313654 [youhaodeyi g] Please see this code below. It will get "can't convert nil to string
+ 313656 [stefano.croc] @name is an instance variable of the Hello object, not of instances of Hello,
| 313660 [youhaodeyi g] If the name is Hello object instance, it should be accessed by Hello
| 313662 [jgabrielygal] It's not ignored. When you see @name="something", you have to think
+ 313664 [lloyd 2live4] class Hello
  313704 [youhaodeyi g] This is really different with Java at this point.
  313726 [dblack rubyp] Yes -- it's a totally different language. Enjoy it :-)

^ Simple IMAP client?
313658 [phil pricom.] People,
313672 [ant serialta] The documentation for net/imap is pretty decent for figuring out what
313720 [phil pricom.] Anthony,

^ shooting star - bug resolvin
313661 [marcin.bazyd] I toyed for some time with shooting star plugin for rails. It has bug

^ Location Intelligence where to from here?
313663 [info yellowf] Most people have heard of location intelligence tools such as Google

^ play audio file
313673 [chen_li3 yah] Does anyone have idea which gem/plug in is used to play audio file under
313680 [uzimonkey gm] There's a gem called win32-sound that's suitable for playing wav files.
313681 [chen_li3 yah] Thank you very much and it works quite well.

^ rdebug 0.10.2, continue not working since last update
313676 [coder68 yaho] just updated to rdebug 0.10.2 this morning and noticed that I can no
313677 [coder68 yaho] Posted via http://www.ruby-forum.com/.

^ Beginner in Ruby
313682 [thiagobranda] OO class this semester and one of the languages we are using is Ruby.
+ 313683 [martindemell] Look through http://rubyforge.org/ to get some idea of the things
+ 313685 [vjoel path.b] What are you interested in? Games, graphics, science, web stuff,
+ 313687 [caduceass gm] Does the project have to be entirely in one language?
| 313698 [thiagobranda] Martin, if you guys want to give us ideas, it would be really
| + 313699 [thiagobranda] Sorry about indentation and weird English.
| + 313700 [serabe gmail] Maybe you should try JRuby then.
|   313701 [james.britt ] If you want to so any serious JRuby GUI work, please look at Monkeybars.
|   313702 [serabe gmail] Thanks, I didn't remember the name. It may sound strange, but it was the truth.
+ 313714 [phlip2005 gm] Driven Development" and "Behavior Driven Development", then learn to use

^ IO#write_nonblock(string, offset) useful?
313684 [rogerpack200] Was asked to repost this under a separate thread, so here it is!
+ 313688 [vjoel path.b] With COW strings, is this really needed?
| 313695 [rogerpack200] Those would be the reasons I'd consider it useful--to save on CPU and
| 313697 [vjoel path.b] It's just that those extra objects are fairly small, due to
| 313703 [rogerpack200] Fascinating.  Thanks for pointing that out.  I guess that being the case
+ 313689 [Rob AgileCon] ...
  313690 [vjoel path.b] Rob, are you aware that your message body is empty, at least on
  + 313693 [caduceass gm] i've noticed loss of the message with some of you other posts, too,
  + 313694 [Rob AgileCon] From email (therefore the newsgroup).  This happens when I forget to

^ Can a Ruby program determine whether it's running on a 32-bit or  64-bit system?
313705 [eric.promisl] I can't go by RUBY_PLATFORM -- I'm setting up a new 32-bit Linux box,
+ 313706 [jan.dvorak k] Well, i?86 means it is 32bit.
+ 313711 [ snk gna.org] Yes.  Look at the result of calling the 'size' method on a Fixnum; it
| + 313790 [paqs140482 g] I got 4 on 64bit Windows Server. That doesn't mean that it depends if it was
| + 313822 [lloyd 2live4] p 0.size
+ 313792 [fred lacave.] => "i386-freebsd6"

^ Class.descendant_of?
313707 [bjohnson con] class A; end
+ 313708 [caduceass gm] class A; end
+ 313710 [phasis gmail] class A; end
+ 313712 [botp delmont] RnJvbTogQmVuIEpvaG5zb24gW21haWx0bzpiam9obnNvbkBjb250dWl0aXZlLmNvbV0gDQojIElz

^ Arcfour encryption algorithm
313709 [ciriusmex gm] I'm looking for a way to use the arc4 encryption algorithm with
+ 313733 [edekzkrainyk] Here you have simple implentation in Python, it should be easy to
| 313845 [ciriusmex gm] I'm gonna have a look at it, thanks ;)
+ 313887 [jecain gmail] I've been using this implementation for a while. Unfortunately, the

^ How can I prevent include one module multi-times?
313713 [youhaodeyi g] I am looking for a method to check whether this module has been
+ 313718 [botp delmont] RnJvbTogWmhhbyBZaSBbbWFpbHRvOnlvdWhhb2RleWlAZ21haWwuY29tXSANCiMgSSBhbSBsb29r
+ 313725 [rogerpack200] Might try parsing Object.constants for the module name.
| 313734 [sepp2k googl] Why? That only tells you whether that module exists (and it only tells you
| 313735 [jcoglan goog] 2008/9/3 Sebastian Hungerecker <sepp2k@googlemail.com>
| 313854 [rogerpack200] ah--if the problem is determining if a descendant exists, you could
+ 313727 [tpreal gmail] What's your question? In the subject you ask 'How can I prevent include
  313729 [jcoglan goog] 2008/9/3 Thomas B. <tpreal@gmail.com>
  313730 [jcoglan goog] 2008/9/3 James Coglan <jcoglan@googlemail.com>
threads.html
top