403447-404529 subjects 403914-410657

Simple Mailer Switch Not Working
403688 [lists@ru y- ] Am a newbie to Ruby. Please help me find out why this snippet of code is
403693 [lists@ru y- ] Can you give a few examples of input? It's difficult to see where it

Select "columns" from multidimensional array?
403698 [lists@ru y- ] There's probably a simpler answer to this than the ways I've come up
+ 403699 [jgabrielygal] Is this the desired output?
+ 403700 [lists@ru y- ] Praise Jesus!
| 403702 [shortcutter@] I'd really start by creating a class for this - or use Matrix from the
+ 403701 [lists@ru y- ] Documenting the end result.
+ 403703 [lists@ru y- ] Thanks robert
| + 403704 [shortcutter@] You're welcome!
| | 403841 [lists@ru y- ] It's only just dawned on me just how useful this kind of thing could be.
| | 403885 [shortcutter@] That's the whole point of OO - or rather software engineering in
| + 403705 [digital.ipse] Worth mentioning that transpose requires each "row" to contain the same
+ 403710 [lists@ru y- ] Looks like good advice, both. My concern with matrices is being able to
+ 403902 [lists@ru y- ] I decided to try and build on the Array class as I don't really
| 403934 [shortcutter@] I wouldn't do that.  With the basic types it is usually much better to
| 403936 [lists@ru y- ] Ok, I wasn't sure how to create an object which behaved like an array.
+ 403903 [lists@ru y- ] def skip_headers
+ 404308 [lists@ru y- ] I've decided to inherit from array after all, since all I want to do
| 404309 [shortcutter@] I usually do not engage in predictions since I don't have a crystal
| 404311 [lists@ru y- ] This class only gets added into scripts, and I'm the only one who knows
| + 404317 [alexg@ru ge ] As Robert says I'm not sure there is any (clean) way to do what you
| + 404318 [shortcutter@] I think you misunderstand OO.  The point of OO is to build
+ 404320 [lists@ru y- ] Thanks for the advice and examples, I'll see whether I can understand
| 404327 [shortcutter@] I didn't put commenting in the gist.  If there's anything unclear feel
| 404360 [shortcutter@] Maybe one explanatory sentence: I chose to use two values for
+ 404364 [lists@ru y- ] I haven't had a chance to look into your example yet; I've been reading
+ 404440 [lists@ru y- ] Interesting Matrix build. It's giving me a bit of a headache just trying
| 404486 [shortcutter@] Yes, Row and Column are a facade to the "real" data and provide a
+ 404488 [lists@ru y- ] def []( addr )
| 404503 [shortcutter@] LOL
| 404579 [lists@ru y- ] Below is a valuable statement. :)
+ 404578 [lists@ru y- ] I've attached my attempt at converting your code to suit mine (hope you
| 404584 [shortcutter@] No, it's not a doctoral thesis. :-)  (allusion to German politics)
+ 404581 [lists@ru y- ] data.keys.map { |k| k[/\d+/] }.max.to_i
+ 404625 [lists@ru y- ] Nice catch on the arguments, I completely missed that.
| 404633 [shortcutter@] You cannot change self.  Or do you mean you change matrix contents?
+ 404634 [lists@ru y- ] Using the filter method on my previous attempt would return a copy of
| 404635 [shortcutter@] That's another reasonable way to do it.  Similar to how String#gsub
+ 404637 [lists@ru y- ] Used "Me" to reference the class so I don't have to keep typing the
+ 404658 [lists@ru y- ] I've now had time to do a bit more testing and debugging, and I've
| 404659 [tigre7t@gm i] i am timo i follow this thread you are doing great
+ 404664 [lists@ru y- ] Thanks Timo.
+ 404667 [lists@ru y- ] From what I've seen of statsample so far it looks more numerically
| 404670 [tigre7t@gm i] hey thanks for some concise notes on this important topic
+ 404671 [lists@ru y- ] Sounds messy. Is the data on the page graphical rather than text based?
| 404784 [tigre7t@gm i] thanks yes you're right the task is tedious and messy
+ 404753 [lists@ru y- ] I thought I could avoid the issue of splitting the data into multiple
| 404754 [shortcutter@] #clone and #dup are _always_ shallow copies.  If you want to change
+ 404755 [lists@ru y- ] Thanks!
+ 404756 [lists@ru y- ] Oh, that was simpler than I thought. I need to do some further testing
+ 404791 [lists@ru y- ] There are various ways to create a database from excel files, so that
+ 405016 [lists@ru y- ] Maybe I should start a new thread for this...
+ 405089 [lists@ru y- ] Hah, I'm such an idiot. I've replaced the hideously inefficient
+ 412480 [lists@ru y- ] A related question... on values from nested arrays / json

Problem redefining String::to_s
403715 [lists@ru y- ] I've been checking String::to_s source code and found an issue.
+ 403746 [sto.mar@we .] (why???)
+ 403808 [lists@ru y- ] I'm using CentOS, it ships with that version but it's fine.
  403826 [sto.mar@we .] Well, you should not expect that.
  + 403827 [fluido@fl id] The method exists, and it is useful when you code method that expect
  + 403829 [lists@ru y- ] because you're told that puts will call to_s in the object you try to
    + 403832 [sto.mar@we .] ri IO.puts
    + 403833 [sto.mar@we .] Maybe you should describe your actual use case in more detail.
      + 403858 [tamouse.list] class String
      + 403860 [matthew@ke w] Philosophically I'd argue that this is more correct anyway.  If your

Ruby Project Ideas to get someone hired...
403718 [colby.callah] I have started learning Ruby this past week and have down the basics of
+ 403719 [mbj@se ni .n] A good idea is to switch to a Unix OS first if you plan to get hired ;)
| 403722 [dummey@gm il] Environment setup wise, running a Linux VM makes life a lot more enjoyable.
| 403725 [colby.callah] Thank you Ricky.  Pacman seems like a fun project.  It sounds like Gosu
| 403727 [dummey@gm il] Gosu in itself doesn't provide the executable packaging. Gosu is the 2D
| 403728 [colby.callah] Releasy is the gem shown on the Gosu page for packaging an .exe from what I
+ 403729 [sduncan@we a] Maybe write some useful puppet modules?
+ 403731 [atma@co va e] Mind you, I'm not an expert. Actually, I'm a newbe/amateur programmer and I've received 2 job offers just because I put some lines of code with sinatra and sqlite on github. Of course I didn't take the job because I'm *not* a programmer.
| 403733 [colby.callah] Thanks for the input Panagiotis.  When I figure out how to use Github, I
| 403734 [carlos.agari] A good start is writing documentation or helping it become better. :)
+ 403740 [matt@te hn r] From my experience, most Ruby folks seem to use Linux or OSX, Windows is
  403742 [colby.callah] Thanks Matt.  I just installed virtual box, ubuntu 12.10 32 bit, is up and
  403814 [tamouse.list] Best of luck, Colby -- Ruby is the most fun programming language I've
  403817 [colby.callah] Everything worked!  RVM, ruby 1.9.3, gem, node.js, sqllite3, webrick up and

Re: Ruby Project Ideas to get someone hired.
403736 [lists@ru y- ] Colby

Can ruby do this?
403737 [lists@ru y- ] First of all, it's easy to deduce from the nature of my question that I
+ 403738 [lists@ru y- ] Yes it can but it would be better to use jquery for that purpose.
+ 403744 [stu@ru yp og] You can use ruby for your purpose. Though what you want to look into
+ 403818 [tamouse.list] I'm not exactly sure what you want here -- are you talking about a

seach tweets with geocode Twitter gem
403741 [lists@ru y- ] ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-darwin10.8.0]

Why Array#include? not working withone liner integer arrays?
403748 [lists@ru y- ] I was trying to write a one liner with integer array using
+ 403749 [sto.mar@we .] The error messages are telling you what the problem is (typos).
+ 403750 [justincollin] You are misspelling "include" :)
| 403752 [lists@ru y- ] The below should work right Logically ?
| + 403753 [justincollin] Without knowing anything about what "driver" is, I would say yes.
| + 403754 [sto.mar@we .] A friendly meant suggestion: Instead of writing posts like this
+ 403751 [prasad.c82@g] `inculde?' -> check the spell

Why can this happen?
403758 [tmaekawa@jc ] Yesterday, I was told by my friend that there is a method named
403760 [sid.ag.shri@] i guess somthing went wrong over there.. as i also just checked and got
403763 [tmaekawa@jc ] What!?

Novice: self, @self.respond_to? and dynamically built methods
403770 [lists@ru y- ] I have been plodding through a Ruby tutorial and came across the
+ 403771 [lists@ru y- ] Have you tried self.methods.include?
| 403773 [lists@ru y- ] Joel,
+ 403775 [sto.mar@we .] To me, this does not sound like a use case for metaprogramming.
  403784 [lists@ru y- ] The code I have is now split into separate files that are 'load' or
  403785 [sto.mar@we .] I like optparse.
  403865 [lists@ru y- ] I am following a tutorial, so am picking up each example as is. I am
  403874 [sto.mar@we .] As I mentioned, one approach could be to use an argument hash.

403776 [ck17@li e. o] ...

403780 [mustafa@al u] Unsubscribe

403786 [mustafa@al u] Unsubscribe

403787 [sto.mar@we .] You need to send this to the controller address, see

403788 [fousto@me co] ...

End-of-life dates for MRI 1.9.x
403790 [lists@ru y- ] I'm trying to find the end-of-life dates for MRI 1.9.2 and 1.9.3. What

Enumeration vs Enumerable
403794 [lists@ru y- ] Can anyone explain what "Enumeration" is? What it does and when a
403796 [calvin.bornh] an enumeration is a general term used to describe (in computer science
403797 [lists@ru y- ] We have an "array" as list,then what the special features Enm has over
+ 403798 [sto.mar@we .] Enumerable is a module that you can include into your own classes,
+ 403799 [calvin.bornh] sorry if I confused you, I just repeated the definition (as I remembered
  403821 [lists@ru y- ] @calvin - Your example is good. But in this context with this example
  + 403823 [tamouse.list] 1.9.3-head :003 > Array.ancestors
  + 403828 [calvin.bornh] an enumerator (I hope you didn't mix enumerator and enumeration up; if

[ANN] reel 0.3.0: Celluloid::IO-powered HTTP server with Websockets, Streaming, and Rack
403800 [tony.arcieri] reel 0.3.0 is now up on the recently relaunched rubygems.org. You can read

IRB equivalent to windows cmd if any?
403802 [lists@ru y- ] I am currently using ruby 1.9.3. But till now i am using windows command
+ 403804 [lists@ru y- ] You can run IRB direct rather than typing irb into the console... What
| 403820 [lists@ru y- ] How does so? Every I need to write "IRB" on the console.
| 403822 [tamouse.list] irb is ruby's interactive mode -- it's very much a command line
+ 403806 [sbagdat@gm i] you can try pry <http://pryrepl.org/>

Re: Welcome to our (ruby-talk ML)         You are added automatically
403803 [ck17@li e. o] Unsubscribe
403807 [ck17@li e. o] #help

Confusion with Enum#with_index
403830 [lists@ru y- ] I was playing to understand the method "Enum#with_index" with the below
403834 [sto.mar@we .] "Couldn't understand..." is not a particularly clear way to
403835 [lists@ru y- ] #<Enumerator::Generator:0x2193ca8>:each>
403836 [sto.mar@we .] ???? That's your input.

[ANN] employer 0.2: Simple background jobs with pluggable backend
403831 [mark@wi ho t] Employer is a new Ruby library that handles background jobs with

Why none of the block giving the expected output with the "enumerator"?
403837 [lists@ru y- ] Why none of the block giving the expected output with the "enumerator"?
+ 403838 [stefano.croc] You create an enumerator from an array. When the enumerator's each method is
| 403839 [lists@ru y- ] @Stefano why is it calling Array's "each" method,instead of
| 403840 [stefano.croc] Because Enumerator#each, in turn, calls the each method of the object it was
| 403842 [lists@ru y- ] @Stefano ->
| 403843 [stefano.croc] Again, there's no difference, since Enumerator#each (when the Enumerator was
| 403844 [lists@ru y- ] @Stefano
+ 403845 [sto.mar@we .] They do, you have wrong expectations. (You really should read the docs
  403849 [lists@ru y- ] `+1` to you. You guided me perfectly! :)

Open file that its name given by STDIN.gets
403846 [lists@ru y- ] in ex15 i've changed this line
+ 403848 [colby.callah] STDIN.read     ?
+ 403850 [stefano.croc] gets returns a string with a trailing newline. This means that, if you enter
| 403851 [lists@ru y- ] You are right:)
+ 403852 [sto.mar@we .] Please include short code snippets directly in the E-Mail
  403853 [lists@ru y- ] Thank you:) My problem has been solved!

incomplete ri documentaion
403847 [lists@ru y- ] gem rdoc --all

ANN asciiart [0.0.5] released
403854 [beholdthepan] Turn images on your heard drive or on the internet to asciiart...even colorized

Class for data analysis: File.open once
403856 [lists@ru y- ] ruby 1.9.3p362 (2012-12-25 revision 38607) [x86_64-darwin12.2.1]
+ 403859 [matthew@ke w] Yep, sure do; and yep, sure is.  The fact that you're using @variables
| 403864 [lists@ru y- ] `+1` nice resolution! :)
+ 403873 [sto.mar@we .] Since you are reading the complete file into memory anyway
+ 403905 [lists@ru y- ] Thanks everyone. They will certainly help.
| + 403906 [matthew@ke w] The previous code already does that, and we showed that it can be done in
| + 403913 [tamouse.list] This last bit would be true in most cases, but you'd be looping
+ 403907 [lists@ru y- ] thanks for your help.
+ 403910 [lists@ru y- ] for bigger files, this code may be better

Easy way to handle positional and hashed parameters on a method?
403857 [tamouse.list] my_method('a','b','c)
+ 403862 [lists@ru y- ] Adding myself to this thread, from personal interest. :)
| 403871 [sto.mar@we .] That's not necessary, just read the posts.
+ 403867 [lists@ru y- ] You already gave an example of how to do this. It is via
+ 403868 [lists@ru y- ] foo({first: 'a', second: 'b', third: 'c'})
  403911 [tamouse.list] All my examples were first run through IRB.

nokogiri xpath method
403861 [lists@ru y- ] for the site
+ 403863 [lists@ru y- ] adding myself to this trail from personal interest.
+ 403866 [fluido@fl id] What's your problem there? Check line 22 of your source code. It has
  403965 [shortcutter@] Cheers

Storing string-data in a module
403869 [lists@ru y- ] I have big module with many tiny methods. These methods
403872 [fluido@fl id] I might be mistaken, but I believe you cannot. There are global
403912 [tamouse.list] *Much* agreed -- this would result in, effectively, a side-effect, or

Confusion with Enum#with_object block argument construct
403870 [lists@ru y- ] irb(main):001:0> module Enumerable
+ 403898 [lists@ru y- ] Can anybody help me here to clear out the confusions?
+ 403899 [lists@ru y- ] [1,3,10,5].each_cons(2).map{|x,y| y - x} #=> [2, 7, -5]
  403908 [lists@ru y- ] Can anyone help me on my question- A. This is a but confusing for me
  403909 [matthew@ke w] I have a little difficulty understanding exactly what you're asking, but
  + 403916 [lists@ru y- ] @Matthew - Thank you very much for your help!
  | 403918 [tamouse.list] Well you should thank him for doing your searching and reading for you.
  | 403919 [matthew@ke w] To be honest, I just wanted to look up #each_cons.  I know #each_slice ,
  + 403917 [tamouse.list] As well as filling in the comments on the page. That is generally how

403877 [tomcloydmsma] Sorry for the noise (if this even gets through). I've have great trouble

403878 [tomcloydmsma] Sorry for the noise (if this even gets through). I've having great trouble
403879 [barchil@gm i] its ok
403880 [tomcloydmsma] ...

couldn't hit a button using selenium-webdriver
403883 [lists@ru y- ] **Code:**
+ 403884 [lists@ru y- ] That's not IRB, that's the command console.
| 403886 [lists@ru y- ] p driver.title
+ 403887 [lists@ru y- ] I'd say your page title already includes "View List", so it isn't
| 403888 [lists@ru y- ] Then how to wait till the page load,disallowing the `click` to happen?
+ 403889 [lists@ru y- ] webdriver should wait for the page to load when it clicks on an element

Can we open a page in a new tab in the same browser using selenium-webdriver?
403890 [lists@ru y- ] driver = Selenium::WebDriver.for :firefox
+ 403894 [lists@ru y- ] I highly recommend watir-webdriver, selenium's API just feels so clumsy
| 403895 [lists@ru y- ] @Joel - > Thanks for your help :)
+ 403901 [lists@ru y- ] driver.execute_script( "window.open('#{address}')" )
+ 406941 [lists@ru y- ] require 'selenium-webdriver'
+ 406945 [lists@ru y- ] Works for me. Are you sure you didn't have another window open?

BrowserCMS demo project creation problem
403891 [lists@ru y- ] I hope this is the place to post this. If it's the Rails list, let me
+ 403893 [colby.callah] I use node.js it is extremely easy to install and worked for me on two diff
+ 403896 [lists@ru y- ] Thank you. You solved the problem, which was that I had NO idea that
  403897 [colby.callah] I am a noob just getting into rails and spent several hours trying to get

Net/HTTP EINVAL error after twitter auth redirect
403892 [lists@ru y- ] This error has just appeared out of nowhere, and it appears to occur
403900 [benweint@gm ] Since the problem only seems to exhibit itself with the New Relic enabled,
403904 [lists@ru y- ] No I haven't changed anything in the code wrt new relic, but it is