250703-254283 subjects 251140-269951

^ using dynamic method calling with attr_writer methods
250952 [markush hni.] I'm a total Ruby newbie looking for help.
+ 250953 [nickclare gm] I'm pretty new to ruby too, but from what I understand, the writer methods
+ 250956 [gwtmp01 mac.] The problem is you are calling the 'getters' with an argument ('foo').
  250960 [markush hni.] Yep, this works perfectly. I already tested this.
  250973 [gavin refine] class Module

^ Syntax in Ruby 2.0
250959 [perl_linux h] I'm starting learning Ruby for a couple of weeks now and I've heard that
250961 [jan.svitok g] So far there's no Ruby 2.0, all we have is 1.9 and when the time

^ installing the compiled binaries windows
250966 [longinos10 h] there's tow options for installing ruby on windows, the one clikc
+ 250974 [_mwryder wor] Did you make sure that the ruby\bin directory is in your path?
| 250975 [longinos10 g] That was it, it was the path
+ 250976 [longinos10 g] I changed the Path, but now other programs can't find the Path, I think
  251049 [chris.hulan ] I'd suggest using the One-click installer.  Is there a specific reason

^ open thesaurus?
250990 [blufur gmail] expand a given term to a set that includes all its synonyms... anyone
250991 [marcel verni] marcel
251512 [blufur gmail] i have been trying to install Ruby-WordNet, to no avail ... :(

^ The Factory Method
250998 [ecomba mac.c] charset=US-ASCII;
+ 251002 [pergesu gmai] One clue is that the example is coded in Java, vs smalltalk.  The
| 251003 [ecomba mac.c] Hey Pat!
| 251004 [pergesu gmai] Go for it.
| 251009 [ecomba mac.c] Done ;) http://www.rubypatterns.org/doku.php/
+ 251027 [james graypr] In addition to Pat's great answer, I think it's important to note
  251034 [ecomba mac.c] Thanks a lot James, I think this clarifies (at least from the newbie
  251035 [james graypr] Sure.
  251036 [ecomba mac.c] Yep! Included! http://www.rubypatterns.org/doku.php/
  + 251040 [cyclewood_lt] Enrique,
  | 251041 [ecomba mac.c] You are free to add your findings in the Wiki Ants! I will take care
  | 251048 [cyclewood_lt] errrm, just had a look at the cofee factory, and haven;t you actually missed off the factory part?
  + 251050 [shortcutter ] I'd go even further and point out that *every* class[1] in Ruby is a
    251062 [ecomba mac.c] Thanks for the clarification Robert! I included it actually in the
    251063 [kabigon gmai] Thank you so much for this discussion, and for starting the wiki.
    251065 [ecomba mac.c] Hey Chris!

^ ruby module developer wanted for 'libmsgque'
251000 [aotto1968 on] I'm a the maintainer for the new project 'libmsgque'

^ Net::SSH exec command on remote host
251006 [kenqcl gmail] I try to use Net::SSH to exec command on remote host. A session was
+ 251015 [alflol gmail] do you have installed the ruby openssl bindings?
| 251038 [kenqcl gmail] The ssh authentication works fine. Login to the remote host
+ 251091 [dwstorie aol] Saga,

^ instance_variables doesn't return unassigned variables
251017 [burnt99 hotm] class ABC
+ 251021 [rick.denatal] Ruby has no concept of 'declaring' instance variables (or any other
+ 251023 [botp delmont] # class ABC
+ 251024 [shortcutter ] irb(main):001:0> Pair = Struct.new :first, :second
+ 251071 [jesse.d.merr] irb(main):001:0> class ABC
  251110 [robert.dober] Hmm that might not be a good idea, a method ending in equals does not
  251181 [skoot ideico] =2E.or, since the original problem was that no instance variable has been
  251196 [robert.dober] I have not written complicated code because I wanted to write
  251314 [rick.denatal] I'm not sure what the OP was really looking for.
  251429 [robert.dober] So true and that is why I thought that having #instance_variables and

^ ruby based forum software
251020 [ivorpaul gma] I would like to know what ruby based forum software to use.

^ loop questions
251026 [lloyd 2live4] I am new to ruby and loving it so far and have beginner's questions
+ 251028 [niko kington] 5.times do |i|
+ 251029 [jameskilton ] i.times do |x|
+ 251030 [shortcutter ] The current value us passed to the block.  So rather do
| 251032 [lloyd 2live4] Excellent!  I *knew* that this language was top notch!
+ 251031 [list.push gm] Is this what you want?
+ 251033 [B.Candler po] "Integers also support several useful iterators. We've seen one
  251037 [lloyd 2live4] Excellent!  I tried this right away and was able to make this mission
  + 251039 [dangerwillro] the | |  is like a  |shoot| or |dumb-waiter| every time through the
  + 251058 [B.Candler po] Whilst the following violates the Don't Repeat Yourself mantra, I think it's

^ Big money in easy way ?
251042 [poltergeista] Posted via http://www.ruby-forum.com/.
251043 [poltergeista] Big money in easy way ?
251044 [poltergeista] Big money in easy way ?
251045 [poltergeista] Big money in easy way ?
251046 [poltergeista] Big money in easy way ?
251047 [poltergeista] Big money in easy way ?

^ Trouble using string.tr()
251051 [promos burch] I've coded up EBCDIC to ASCII translate strings.  Everything is working
+ 251053 [aledonne.lis] Please do post the code.
+ 251054 [shortcutter ] Yes, that would be good.
| 251056 [promos burch] Here are the two translate strings.   Need more code?   Thanks y'all.
| 251057 [promos burch] Note, the version I'm showing has the backslash.  It fails with or
| 251061 [shortcutter ] => "\\>"
| + 251064 [promos burch] I'll need to code up a smaller example than the 400+ lines I have right
| | 251066 [promos burch] Here a whole program that illlustrates the error.  I'm running under
| | + 251067 [promos burch] Here's another twist.
| | | + 251073 [promos burch] Moving the numbers to the front of the FROM_STRING and the TO_STRING has
| | | + 251074 [jeremy hineg] Have you tried just funnelling the data through some other tool?  For
| | |   251098 [promos burch] No, and I would rather not.  Your example seems pretty thorough.
| | |   251099 [promos burch] (up above, I had the 0x60 / 0x2D pair commented out while I was testing
| | + 251102 [Rob AgileCon] First, damn you for getting me interested in this ;-)
| | | 251117 [promos burch] Yeah, but it's guys like you that make the world a happy place.  As
| | + 251104 [pit capitain] first, in case you don't know, you don't have to terminate statements
| |   251116 [promos burch] Pit - you are DA MAN!!!   WOO-HOO!!!   Success with just the few things
| |   251187 [pit capitain] Yes, I thought so, and I wasn't sure whether I should mention it. Glad
| |   251295 [rick.denatal] By coincidence, a French friend just sent me instructions on a cheap
| + 251072 [promos burch] Correct.  I thought it was.  I was grasping for straws.
+ 251059 [Rob AgileCon] where does the code X'5C' appear?  (that's a \ in ASCII)  Even in
| 251068 [promos burch] In ebcdic, a 0X5C is an asterisk.  In ebcdic, a 0XE0 is an backslash.
+ 251060 [seebs seebs.] puts ">".tr('>a', 'bc')  --> 'b'
  251069 [promos burch] The character prior to the > is an underscore.   Todd

^ regex \w allows non english characters
251052 [ehudros gmai] I'm looking for a way to only allow english characters through a
+ 251055 [shortcutter ] [a-zA-Z]
| 251082 [kyleaschmitt] I'm making a guess here, but ruby is probably looking at the Hebrew
| + 251159 [nobu ruby-la] /[[:alpha:]]/u
| + 251256 [kbloom gmail] Unless you're using special fonts that do a special mapping (which is
|   251270 [kyleaschmitt] As I said a guess ;)  That's really interesting though.  So had it
|   251506 [eden.li gmai] Depends on what you mean by "work."  If you don't set a global $KCODE
+ 251329 [eden.li gmai] The meaning of \w can change if you alter the global $KCODE variable.

^ Consistency in 'raise'? usage
251070 [dennism1045 ] First let me say I'm new to ruby and RoR.  I am attempting to use IPAddr
251172 [B.Candler po] This is equivalent to

^ [ANN] oniguruma 1.1.0 Released
251079 [dichodaemon ] oniguruma version 1.1.0 has been released!

^ Defending Ruby's OOP
251083 [hollandlucas] I've got someone here saying that Ruby (and other languages) can't be
+ 251085 [seebs seebs.] Argue with smarter people.
+ 251086 [jameskilton ] Tell him to find a more substantial argument. That's the lamest complaint I
| + 251088 [seebs seebs.] Doesn't Tcl essentially do that?
| + 251092 [gwtmp01 mac.] If Ruby is 100% OOP, then what is Smalltalk?
| | 251166 [shortcutter ] Probably more in the 120% area. ;-)
| | 251167 [ecomba mac.c] LOL... That makes Smalltalk somehow metaphysical... It's like saying
| | 251171 [dangerwillro] Smalltalk IS somehow metaphysical! quantum-something.
| + 251096 [gregory.t.br] I'm patiently waiting for the Oatsmobile.
| | + 251097 [alang cronos] I certanly dig my Toyoata.
| | + 251100 [agorilla gma] And once you get one, you can declare yourself to be Oatman!  I'm not
| |   251114 [gregory.t.br] well, a car fueled by oats would probably be carbon neutral... Oatman
| |   + 251133 [agorilla gma] True!  You could retire by selling off your carbon credits.  Having
| |   + 251777 [robert.dober] One has to be careful about that, it depends how the oat is grown :(
| + 251119 [sam powersou] the_if = if.new
| + 251129 [no.spam plea] That, my friends, is exactly how LISP programmers are created.
| + 251137 [botp delmont] # Or better yet, tell him to design a language that has "if"
| | + 251138 [dangerwillro] Indeed, it is a pointless argument. Even smalltalk is not 100 percent
| | + 251151 [gregory.t.br] to get each char, you don't do each, you do something like each_byte {
| |   251153 [gregory.t.br] Note if you really wanted to use this, you'd need to use some sort of
| + 251316 [rick.denatal] Not entirely true.
+ 251089 [codeblogger ] You don't need to defend yourself. Tell your friend he hasn't understood OOP
+ 251090 [gwtmp01 mac.] Just redefine the meaning of 100%, that should work.
| 251120 [sam powersou] And more importantly, what value would that bring?
+ 251094 [debertin gma] Well, as others have said, it's a stupid thing to argue about.
| 251228 [pbrannan atd] Blocks are not objects, either, until they are encapsulated into a Proc
+ 251164 [ecomba mac.c] Do you have to?
+ 251371 [lloyd 2live4] Yeah, it is just silly.  If he has his own definition of 100% OOP, why
+ 251583 [pbooth nocoi] Remind him that Ruby is, of course, superior to all other languages
+ 251597 [mikehamilton] I have to wonder what exactly the benefit of having control structures
  251606 [dangerwillro] Hmm... there could be some bizarre and interesting possibilities.

^ self in blocks
251105 [vascoas gmai] class A; end
+ 251106 [mental rydia] self will normally refer to self in the lexical scope of the block (#2).  class_eval, module_eval, instance_eval, and instance_exec are special exceptions to this rule.
| 251113 [vascoas gmai] I confess I don't like this approach :S (rules with exceptions, doesn't
| + 251115 [dblack wobbl] I think so.  (I can't remember what instance_exec does/will do, but
| + 251118 [mental rydia] In Ruby's core library, yes.  It's possible to implement new methods with similar behavior (which is occasionally useful), but that isn't the norm.
|   + 251121 [gavin refine] class Person
|   | 251122 [gavin refine] bp( 9 ){
|   | 251126 [vascoas gmai] I agree with you (Gavin Kistner). The question is, what could you loose
|   | 251127 [dblack wobbl] Why constrain it to be one way or the other, instead of being able to
|   | 251128 [vascoas gmai] Excellent!! Your post said everything!
|   + 251269 [rick.denatal] Don't forget define_method .
|   | 252004 [robert.dober] You are a genius Rick!!!
|   + 251878 [vascoas gmai] How can i do that?
|     + 251910 [robert.dober] Now this is really *ugly*, but maybe you can make it less ugly?
|     + 251934 [dblack wobbl] # Requires Ruby 1.9
|       251943 [rick.denatal] I'm not exactly sure where the name came from. Matz mentioned it in
+ 251107 [dblack wobbl] self doesn't really behave; it just plays the role it's assigned to
+ 251108 [gwtmp01 mac.] One of the purposes of of #class_eval is to explicitly change

^ to_a
251109 [ari aribrown] Howdy, jewel hunters
+ 251111 [robert.dober] This depends on the content of line 45 of 122_CreditCards.rb ;)
| 251112 [ari aribrown] Ok, I seemed to have fixed it. .to_a works, but what I need was .split
| + 251139 [dangerwillro] Ari, warnings about deprecations are just that. Warnings. They ARE
| + 251275 [rick.denatal] Ari,
+ 251285 [martindemell] obj.to_a -> anArray
  + 251292 [rick.denatal] Not exactly the same thing though, if you don't know that the obj
  | 251294 [dblack wobbl] [*1]   # => [1]
  | 251297 [rick.denatal] Yep, as long as you actually USE it <G>
  | 251300 [dblack wobbl] Whoops :-)
  + 251309 [ari aribrown] This is an email that will respond to all who are interested in my

^ AD over SSL using Net/LDAP?
251123 [a.goo0h gmai] Has anybody gotten Net/LDAP (0.4) to work with AD over SSL? I can
251530 [garbagecat10] At least one of my commercial clients has done exactly this. Are you sending

^ hpricot choking on large attributes
251130 [rm_rails che] =================
+ 251135 [TimHunter nc] What did why say when you posted this problem to the hpricot mailing list?
+ 251169 [why ruby-lan] Oh, you can increase the buffer size with: Hpricot.buffer_size = 262144

^ Object-oriented solution to Tower of Hanoi
251131 [rabbitblue g] pretty amateur, but I've been a programmer for about 6 years and up
+ 251144 [mday mac.com] charset=US-ASCII;
+ 251150 [bulliver bad] Very interesting. I find myself in exactly the same boat. I fell into my love
| + 251168 [shortcutter ] While it is certainly a good thing to improve your knowledge of algebra,
| | 251246 [bulliver bad] Thanks Robert, good advice...
| + 251267 [rabbitblue g] Yup, I feel you there. I've got a geometry book at home waiting eagerly
|   + 251284 [rdm cfcl.com] I find Sedgewick to be a lot more useful than Knuth, because
|   | 251369 [lloyd 2live4] The idea behind the solution as well as the source code (in java) and a
|   + 251395 [martindemell] give http://www.brpreiss.com/books/opus8/ a look.
+ 251724 [gavin refine] The move_stack method could be made a little cleaner by checking for

^ how to remove dups from 2 lists?
251136 [mikejaystein] I'm trying to write some code that removes all elements from 2 lists that
+ 251141 [Rob AgileCon] Having some examples might help, but is something like this what
| + 251233 [mikejaystein] I'm looking for a function that will eliminate all matching items, like
| | 251240 [caduceass gm] I thought this looked a lot like simplification.  I can find a lot of
| | 251241 [gavin.kistne] class Array
| + 251273 [wonado donne] Isn't this what you want?
| | 251298 [mikejaystein] Good idea about the & operator for sets, but there could be more than 1
| | 251368 [moisesmachad] Well, this while loop will not terminate because [] is considered true
| + 251286 [wonado donne] Or is it something like this?
|   251304 [wonado donne] If it is the wanted direction, the program is simple.
|   + 251332 [lloyd 2live4] Wolfgang, that is VERY slick!  Well done!
|   + 251386 [rick.denatal] class Array
+ 251146 [list.push gm] If I understand correctly, I think this does what you want.
| 251147 [list.push gm] Oops! Correction.
+ 251160 [alexg kuicr.] Here is how I would write it: (it didn't give quite the same results
| 251170 [shortcutter ] Sets also come in handy - especially if those lists are large.
| 251173 [ecomba mac.c] I would actually need to know what you really want to do :( Let me
| 251174 [B.Candler po] Is it safe to delete from lists while you're enumerating through them?
| 251176 [ecomba mac.c] Actually not ;) It depends if other objects are trying to access
| 251192 [klcompt gmai] Assuming my previous assumption of what exactly is needed... at this point
| 251198 [sonoflilit g] a = [a, b, c, d, e, e]
| 251199 [lloyd 2live4] I am new to Ruby but I am wondering why it is that no one is using the
| + 251202 [klcompt gmai] I think a big part of it is that there are variations in what we assume the
| | 251215 [lloyd 2live4] I have to say that I am almost certainly being simplistic here but why
| | 251221 [list.push gm] What happens here? :)
| | 251226 [lloyd 2live4] If you are asking about my example, there were no 5s in it to begin
| | + 251231 [mikejaystein] Wow - this question generated lots of replies! I'm still reading through all
| | | 251242 [klcompt gmai] Looks good to me!
| | + 251236 [list.push gm] Yeah, this is very educational.
| + 251490 [ray warmroom] Using uniq would get rid of the duplicates in each list. The original
+ 251163 [klcompt gmai] I'm also not real sure of what exactly you wanted but..
+ 251208 [caduceass gm] This is how I would do it (that is, if I understand the OP's request).
| 251209 [caduceass gm] puts "list1: #{ca.inspect}"
+ 251210 [list.push gm] After thinking about your question again, I think you meant something