411589-413140

411396-412170 subjects 411829-412226

need to help on to use delete_if
411589 [lists@ru y- ] I need a help to fix the below code,Quick help is highly appriciated
+ 411590 [lists@ru y- ] nodelist.delete_if {|new_entry| !new_entry.match(nodelist)}
+ 411592 [atma@co va e] Here

Is there any pure ruby jobs india
411597 [lists@ru y- ] I Learned ruby recently.I do know also Nokogiri,selenium-webdriver. In
411599 [lists@ru y- ] I think your approach is wrong. You need to see yourself as a programmer

undefineds and or-equals
411610 [tamouse.list] foo ||=3D nil
411612 [corin@du dr ] I'm not really sure if I know what you're asking but I can give it a shot.
+ 411615 [tamouse.list] On Oct 23, 2013, at 12:55 PM, Corin Schedler <corin@dubdromic.com> =
| 411633 [jgabrielygal] isn't a really serious enquiry, I was just wondering how Ruby makes the de=
| 411701 [tamouse.list] Awesome explanation. Thank you, Jesus.
+ 411643 [jw1496@at .c] in Schedler
  411644 [jgabrielygal] you will see the full explanation. The difference is more apparent

some questions on ruby - case1
411621 [lists@ru y- ] ##############################
411638 [jw1496@at .c] You can duplicate objects with the #dup method.  This creates a copy without introducing a temporary variable.  The normal assignment operation just copies a reference, so in your code tools_info refers to the same object instance and not a copy.  (Also, I think #clone is an alias of #dup.)
411639 [jw1496@at .c] tools_info = tools_info.slice(0..2)
411640 [lists@ru y- ] This doesn't do the same thing as #slice!, the return value is what is
411641 [jw1496@at .c] tools_info = tools_info.dup.slice!(0..2)

some questions on ruby - case2
411622 [lists@ru y- ] ##########################

some questions on ruby - is any variable in ruby can control trace back limit?
411623 [lists@ru y- ] When click CTRL-C when ruby script running, it always give trace back.

Re: some questions on ruby - case2(can carry local variable through scope of block?)
411625 [lists@ru y- ] If you set "status" outside of the block, it should then use that
411629 [lists@ru y- ] If define status before servers.each, then 'status' in servers.each is
411630 [lists@ru y- ] As far as I know, it's only possible if you have a variable already

Re: some questions on ruby - case1(hash values changed unexpected)
411626 [lists@ru y- ] It's this: "tools_info.slice!"
411627 [lists@ru y- ] I know this, so I use "!", what I want is modify 'tools_info' but don't
411631 [lists@ru y- ] You could always use tap if you don't want a local variable hanging
411670 [lists@ru y- ] Thanks for your help check this issue, now I understand, in ruby, the

Is it easy for a bad programmer to write overly complicated code? (was: Re: Normal For Loop)
411635 [shortcutter@] I changed the subject as I feel we are moving away from the topic.
+ 411636 [lists@ru y- ] Is it easy for a bad programmer to write overly complicated code? (was: Re: Normal For Loop)
| + 411642 [fluido@fl id] Sorry for the delay!
| | 411648 [lists@ru y- ] I chose my words carefully :-) it's why I said 'live code'.  Anyone
| | 411652 [fluido@fl id] It becomes soon evident to anybody who cares for his/her code that
| | + 411654 [lists@ru y- ] I stand by the idea that putting into production more complex code than
| | | 411655 [fluido@fl id] No. Either you do one thing, or you do the other. Notice the
| | + 411658 [shortcutter@] Not sure I agree here.  If a method can be written with simple
| |   411660 [fluido@fl id] When I mention code generators, I mean something that can be operated
| |   411664 [shortcutter@] Now, this is an interesting question: how formal would an input for a
| |   411686 [lists@ru y- ] Bearing in mind that the first one was COBOL, track record not looking
| + 411657 [shortcutter@] In Ruby land we usually consider TMTOWTDI to be a good thing.  Luckily
| + 411693 [tamouse.list] Let us suppose for the moment that all that is true. What do you
+ 411637 [lists@ru y- ] Is it easy for a bad programmer to write overly complicated code? (was: Re: Normal For Loop)
+ 411656 [lists@ru y- ] Is it easy for a bad programmer to write overly complicated code? (was: Re: Normal For Loop)
+ 411666 [lists@ru y- ] Is it easy for a bad programmer to write overly complicated code? (was: Re: Normal For Loop)
| 411667 [chris.hulan@] Deep Blue was the chess computer
| 411673 [shortcutter@] Watson was the one I had in mind.  Thanks, Chris and Joel!
+ 411698 [lists@ru y- ] Is it easy for a bad programmer to write overly complicated code? (was: Re: Normal For Loop)
| 411699 [tamouse.list] Oh, no, not defending Ruby. The set of assertions you make about bad
+ 411702 [lists@ru y- ] Is it easy for a bad programmer to write overly complicated code? (was: Re: Normal For Loop)
  411706 [shortcutter@] I am not sure I still understand what point you are trying to make or
  411708 [cebirim@gm i] i've just across a ruby gem called flog

Help with ideas for finding dups on very large file
411661 [ruby.student] I have a file with over a million records ordered in chronological order. A
+ 411662 [hassan.schro] I'd create a DB table with fields for ID and INSTANCE and put a
+ 411663 [justincollin] I think you are close, but what you are considering is searching the
+ 411668 [Reid.Thompso] use [gn]awk
  411675 [shortcutter@] I also think we need a two step approach because storing whole files
  411696 [justincollin] Why parse each file twice?
  411707 [shortcutter@] Because of the subject.

Remote Rails Job
411665 [lists@ru y- ] For anyone interested. Pays well and you can work from home. For info,

[ANN] zenweb 3.3.0 Released
411669 [ryand-ruby@z] zenweb version 3.3.0 has been released!
411694 [tamouse.list] Ryan,
411705 [ryand-ruby@z] On Oct 25, 2013, at 09:09 , tamouse mailing lists =

Wrong realization of method?
411671 [lists@ru y- ] Can anybody help me?
411672 [fluido@fl id] Well, can't you see where the 'return nil' statement is? The method
411674 [lists@ru y- ] Carlo, thanks very much for your attention and your reply!
411676 [mailme@hs s.] So u ran the same SQL statement from the console and got the required out

Ruby or Python for a cross platform command line project?
411677 [lists@ru y- ] I want to create a cross platform command line application. I don't know
+ 411678 [marco-oweber] Both are likely to work. It depends on your project details.
+ 411679 [mailme@hs s.] If you prefer to work using Ruby, then use Ruby. I hope that you are not
+ 411680 [lists@ru y- ] To install a big dependency for a little project is not a problem for
| 411681 [mailme@hs s.] Depends on the functionality, actually. If the application is good, i won't
+ 411683 [shortcutter@] But there are Ruby packages in the repositories.
+ 411684 [lists@ru y- ] On Windows you should be able to support Ruby with Ocra and Inno Setup.
+ 411685 [scottyspictu] Mac has both Ruby and Python installed by default. Depending on the
+ 411688 [lists@ru y- ] respository.
| 411692 [tamouse.list] The general advice seems to be avoid the packaged versions of Ruby on
+ 411695 [lists@ru y- ] I don't care if it's outdated or not. I prefer to use a outdated version
  411700 [tamouse.list] No worries, code it in whatever works for you.

I am getting many messages from ruby-talk going to spam on gmail..
411687 [tamouse.list] I found a whole lot of messages from ruby-talk in my gmail spam folder
+ 411689 [chris.hulan@] every now and tehn a message will get flagged
| + 411690 [tamouse.list] I hope so.
| + 411703 [joelvanderwe] Yes, it's very annoying, especially since thunderbird's "Not Junk" is
|   411704 [normalperson] It's likely in their best interest to not waste time supporting
+ 411691 [fxn@ha hr f.] I found a whole lot of messages from ruby-talk in my gmail spam folder

Ruby namespacing with a class vs. module?
411697 [lists@ru y- ] Consider the Ruby class `Foo::Bar`.

RSpec with signed in user
411709 [mailme@hs s.] I am leaning rails development using RSpec, but there is one thing that i

Help with a loop
411710 [lists@ru y- ] Hey I'm a noob at ruby so far but learning fast
+ 411713 [list.push@gm] Here is an idea trying not to stray too much from your code.
| 411722 [abinoam@gm i] # Fix the 'max=10' to fit what you need as maximun iterations count.
| 411726 [lists@ru y- ] Ok you guys get the idea, but i need it to output every single time it
+ 411727 [lists@ru y- ] I worked it out I think

License of Ruby before 1.9.2
411711 [musicdenotat] ...
411725 [sto.mar@we .] actually, it's a dual BSD/Ruby license.

HELP-understandable error
411712 [lists@ru y- ] def contenu(nb)
+ 411715 [chris.hulan@] looks like 'css("span")[4]' is returning nil
+ 411716 [lists@ru y- ] in `inspect': wrong number of arguments(1 for 0) (ArgumentError)
| 411717 [chris.hulan@] sorry,
+ 411724 [lists@ru y- ] @page.css("tr")[nb.to_i].css("span").inspect
| 411735 [chris.hulan@] it should print the object
+ 411737 [lists@ru y- ] See in the file attached.
| 411739 [chris.hulan@] array indexes start at 0
+ 411740 [lists@ru y- ] Oh yes it was that, the element i will is the 4th not the 5th, i am so
  411743 [chris.hulan@] sure, glad i could help

Values and statements
411714 [musicdenotat] 1. eval(statement) will create it's own scope and run the commands in
+ 411718 [tamouse.list] Could you please show real code that exhibits the behaviour you're
| 411719 [musicdenotat] puts=3
| 411721 [abinoam@gm i] What versions are you testing it on?
+ 411720 [lists@ru y- ] I get
+ 411723 [shortcutter@] No.  There's no difference between calling eval with or without
  411729 [tamouse.list] pry(main)> puts = "some silly string"

nill output message (classes)
411728 [lists@ru y- ] I'm trying to practice and learn by making my first program. I just
+ 411730 [lists@ru y- ] If you're using IRB you'll get "nil" as a return value when you perform
| 411745 [ryand-ruby@z] Wrong. Nil is a value just like everything else. Something was returned: nil.
| 411747 [lists@ru y- ] Fair point.
+ 411731 [lists@ru y- ] I'm referring to the bill between the monthly results and the overall
+ 411732 [lists@ru y- ] The last action in the method "calculate" is "puts". This returns nil.
| 411733 [echristopher] To elucidate: you have the line `p debt.calculate`, where you probably want
+ 411734 [lists@ru y- ] FYI for your purposes, "gets.chomp.to_f" is the same as "gets.to_f".
| 411748 [shortcutter@] Even better Float(gets) returns a float and throws if the input is not
| 411774 [lists@ru y- ] Thank you! Didn't know that neither. I'm learning a lot here. :D
+ 411744 [sto.mar@we .] @balance = balance.to_f
+ 411746 [ryand-ruby@z] puts "%-7d %8.2f %8.2f %8.2f %8.2f" % [$m_counter, @payment, =
  411773 [lists@ru y- ] Wow.. didn't know that. :D
  411775 [calvin.bornh] the method at work here is #% which formats the receiver by substituting
  411777 [shortcutter@] Frankly, before I write

Grabbing an integer out of an array
411736 [lists@ru y- ] class List
411738 [lists@ru y- ] def self.find_contact(contact_id)

[ANN] mime-types 2.0 Released
411741 [austin@ru yf] mime-types version 2.0 has been released!

Ruby Variable assignment
411749 [lists@ru y- ] a = ":name, btnK"
+ 411750 [lists@ru y- ] Without showing the exact code triggering the error, there is no way we
| 411751 [lists@ru y- ] File1.rb
| 411756 [lists@ru y- ] ===========
+ 411752 [lists@ru y- ] Watir expects Hash arguments, not String arguments.
| 411753 [lists@ru y- ] =======
+ 411755 [lists@ru y- ] irb(main):006:0> b.button( name: "btnK" ).flash
+ 411757 [lists@ru y- ] You must have required the file at some point or you would get an
  411758 [lists@ru y- ] I required the file in File2.rb but I commented the line. Not sure how

How can I use module methods as class methods ?
411759 [lists@ru y- ] module A
+ 411760 [lists@ru y- ] Posted via http://www.ruby-forum.com/.
+ 411761 [johnmoonyy@g] When you want to include Modules into a Class you would typically do
| 411763 [lists@ru y- ] module A
+ 411764 [lists@ru y- ] By defining self.foo you're explicitly saying that it belongs to module
  411778 [shortcutter@] The most straightforward approach that satisfies the thread subject
  411781 [lists@ru y- ] This was already covered in the initial post, he's using a module with
  411783 [shortcutter@] Aargh!  Overlooked that.  Posting after midnight... Thank you for the
  411784 [shortcutter@] I have updated the gist with a more appropriate solution that reduces

How does top level method is being called Inside the block with instance_eval?
411762 [lists@ru y- ] class Foo
411765 [jgabrielygal] It's because methods defined in the top level end up being defined as
+ 411766 [lynksdunord@] unsubscribe
+ 411767 [lists@ru y- ] class Foo
  411768 [jgabrielygal] Because blocks (do...end) are closures and have access to their
  411769 [lists@ru y- ] Excellent!
  411770 [jgabrielygal] Variables that start with @ are instance variables. Instance variables

Cucumber+Ruby+Watir variables scope?
411771 [lists@ru y- ] I'm using Cucumber+Watir to write few tests on google url. Following is

Volumetric visualization
411772 [lists@ru y- ] for study purposes I need to create a SketchUp Ruby script for

Project for Ruby- Theater seating
411776 [lists@ru y- ] I need help...This is a project I have been trying to finish.
+ 411779 [chuongv@gm i] You asked us this at the beginning of the month and said it was due in a
| 411780 [chuongv@gm i] Oh and by the way I tried to run what you have so far and got an unexpected
+ 411782 [sto.mar@we .] syntax error!
| 411785 [shortcutter@] I agree to what has been said before: for someone who has learned C++
+ 411787 [lists@ru y- ] Thanks. Sorry. Wrong post. Already completed! But if someone post
  + 411788 [peterhickman] Thats your opinion and you are welcome to it :)
  + 411791 [shortcutter@] Yes.  And what constitutes "help" of course depends on the case at hand.

Ruby, find path of a directory
411786 [lists@ru y- ] Is it possible to find/get the complete path of a directory by
411789 [aleiphoenix@] assuming working directory is /tmp .

Which GEM to instal for TK?
411790 [lists@ru y- ] I have Ruby 1.8.6 and gem 1.3.4 both on SUSE Linux and on Mac OSX 10.4
+ 411792 [echristopher] I haven't used this in several years, but the tk_as_gem gem used to work to
| 411805 [lists@ru y- ] tcltklib.c:1995: error: 'CHECK_INTS' undeclared (first use in this
+ 411794 [michel.reves] I got it from the Fedora repository, perhaps you may also get it from
+ 411796 [sto.mar@we .] On a side note: 1.8.6 is **really** outdated, and unless you have
| 411804 [lists@ru y- ] I would like to switch too, but from what I know, the later versions
| 411806 [sto.mar@we .] I do not really know anything about OS X, but I'm pretty sure
| 411807 [lists@ru y- ] Homebrew unfortunately doesn't run on OSX 10.4.
+ 411814 [justincollin] There may be a version old enough for you.
  411816 [lists@ru y- ] There *might* be, but not free. ActiveState has the interesting price
  411817 [justincollin] Oh then you should check out http://rdoc.info/stdlib/tk/

Output Source Code to Text document
411797 [lists@ru y- ] So I have a simple ruby script I created for an assignment and my
+ 411798 [lists@ru y- ] Not sure what you mean by a "formatted" text file, but if you want to
+ 411799 [lists@ru y- ] Ah, that's it. I was over complicating the task. That helped a lot.
+ 411800 [sto.mar@we .] That doesn't make *any* sense to me. You could copy the file using the
  411843 [lists@ru y- ] What? You don't write your Ruby code in Microsoft Word?
  411846 [sto.mar@we .] Not yet... but as soon as I get Word running under Wine on my

New Ruby Dev Tool
411801 [ekemokai@cr ] Hope all is well with you in Rubyland.
411802 [ryand-ruby@z] On Oct 29, 2013, at 13:00 , Edmond Kemokai <ekemokai@crudzilla.com> =
411803 [ajkumar_25@y] ...
411810 [ekemokai@cr ] Hope you are well and thanks for the feedback.

Restore a marshall file .
411808 [lists@ru y- ] a file marshall. That is to say retrieve the original file. Thank you in
+ 411809 [shortcutter@] irb(main):004:0> x = rand(1000).to_s
+ 411811 [lists@ru y- ] I tried using Marshal with my RubyExcel gem in IRB, and I got these
  411812 [justincollin] Marshal calls rb_respond_to() which calls rb_obj_respond_to() which

FFI library/gem status
411813 [headius@he d] The FFI library has been officially taken over for maintenance by the
411815 [hmaddocks@me] This is great news. We'll done.

[ANN] CodeNotes 0.0.1 CodeMetrics 0.1.2
411818 [lists@ru y- ] CodeMetrics 0.1.2  - An extraction then fork of the Rails stats task

mysql interface
411819 [lists@ru y- ] specifically, i am using mysql and am coming from a php environment
+ 411820 [ruby-talk@la] ActiveRecord and Sequel are the most widely used database mapper
| 411822 [sto.mar@we .] There is also DataMapper.
| 411823 [ruby-talk@la] AFAIK there has been no activity on the core DataMapper codebase
+ 411824 [lists@ru y- ] i suspect asking which is the preferred one is like asking who has the
  411826 [atma@co va e] charset=utf-8

ANN: Sequel 4.4.0 Released
411825 [lists@ru y- ] Sequel is a lightweight database access toolkit for Ruby.

[ANN] TeamCity Ruby Client 1.1.0 Released!
411827 [lists@ru y- ] teamcity-ruby-client version 1.1.0 has been released!

Ruby automatically include (or run) code on require-action
411828 [lists@ru y- ] module Foo
+ 411831 [atma@co va e] charset=utf-8
+ 411832 [lists@ru y- ] You mean like this?
+ 411834 [lists@ru y- ] Yes, but you used include.
| + 411835 [lists@ru y- ] I'd like to know your motivation.  Why do you want it to auto-include
| + 411844 [shortcutter@] Yes, but Joel did it in the required file.
+ 413139 [lists@ru y- ] -> I would like to have this as I could eliminate a lot of
+ 413140 [lists@ru y- ] It sounds dangerous to me. Without specifying "include" inside the
threads.html
top