## 401581-402293

401380-407191 subjects 401784-402172
```
Own sort method
401581 [lists@ru y- ] But now I want to compare my method with core-method, how can I do it?
+ 401582 [shortcutter@] Why?
+ 401587 [lists@ru y- ] It was be an exercise of learning guide :)
| + 401588 [shortcutter@] You are not sorting Arrays but Arrays which must be filled with
| | 401589 [lists@ru y- ] Thank you. Problem is solved
| + 401599 [sto.mar@we .] words[i], words[i+1] = words[i+1], words[i]
+ 401601 [lists@ru y- ] Posted via http://www.ruby-forum.com/.
| 401602 [jarrodhenry@] StupidSort/Gnome Sort vs Quicksort.
+ 401604 [lists@ru y- ] Exactly! I forget it! :)
| 401606 [lists@ru y- ] Yes -- compared to "serious" algorithms like quick sort.
+ 401609 [lists@ru y- ] "home made" implementation written in a slow language doesn't stand a
401628 [stu@ru yp og] Do a bubble sort for learning sorts and algorithms. For complexity attempt

Contribuer Diaspora
401597 [flaburgan@ge] ...

Algorithm for choosing object based on priority
401598 [lists@ru y- ] Since I am not computer graduate (electro engineer as mater of fact) I
401603 [jgabrielygal] I'm not sure I understand correctly, since 1 + 5 + 10 + ... +
+ 401608 [eule@sp ce c] ... and this sounds like a loaded die, as in
+ 401610 [lists@ru y- ] Thanks so much. I guess I was over-complicating.
401612 [jgabrielygal] There could be one complication depending on the requirements. If you
401613 [jgabrielygal] This algorithm has the consequence that the biggest weight entries
401621 [eule@sp ce c] Or to combine the two ideas, weight the die with the values from the hash.
401624 [jgabrielygal] Yes, that's what I meant, but rereading myself I explained it really badly :D

Short survey: building a ruby tag cloud
401605 [blambeau@gm ] For a talk about ruby that I'll give in about two weeks, I'd like to build
401862 [blambeau@gm ] PLEASE DO NOT submit after having visualized the cloud, as you might be
401886 [saji@u- iz .] Nice visualization!

Novice: Understanding instance 'variables' and methods
401607 [lists@ru y- ] A question - or comment - on instance variables.
+ 401611 [eule@sp ce c] Hei,
+ 401614 [jgabrielygal] As has been answered, you cannot get at the instance variables
+ 401615 [lists@ru y- ] That's true.
+ 401626 [lists@ru y- ] I am nearly there!
| 401627 [fluido@fl id] No. There cannot be two methods with the same name in Ruby.
+ 401629 [lists@ru y- ] carlo,
| 401647 [lists@ru y- ] Kind-of. There is special syntactic sugar for methods with names like
+ 401648 [lists@ru y- ] First, I suggest that you learn more than one variable name.  Naming
401651 [stu@ru yp og] attr methods actually do the creation, probably with convert to string

Ruby + Selenium-webdriver
401616 [lists@ru y- ] I am a total beginner of Ruby and Selenium and i want to use both =)
+ 401617 [lists@ru y- ] I recommend using Watir-Webdriver, as this is Selenium with a great
| 401643 [lists@ru y- ] Thank you Joel I will check this out.
| 401650 [lists@ru y- ] What actually happens below? See my comments after #
| 401671 [lists@ru y- ] You don't need this in Ruby 1.9
+ 401631 [lists@ru y- ] require 'watir-webdriver'

[ANN] ruby_parser 3.0.4 Released
401618 [ryand-ruby@z] ruby_parser version 3.0.4 has been released!

ActiveRecord::Base:Class "establish_connection" generates NoMethodError ActiveRecord without Rails
401620 [lists@ru y- ] NoMethodError.

Get involved in the Diaspora project
401630 [flaburgan@ge] ...
+ 401639 [imran.nazir@] I would to become a contributor. I am fluent in Ruby but don't have years of=
| 401652 [carlos.agari] Imran,
+ 401806 [code@ap th o] Is there some portion of the project that does not require code release

error in if
401635 [Mohammed-Yas] WHat's the error here?
+ 401636 [fluido@fl id] Sorry for the delay!
| 401638 [Mohammed-Yas] ...
+ 401637 [peterhickman] There is no such construction in Ruby (were you thinking about another

why this behaves like singleton
401640 [lists@ru y- ] print g1 locks
+ 401641 [lists@ru y- ] a class variable (in your case @@locks) is shared among the class and
+ 401642 [jgabrielygal] class Lock

Getting the smallest Items of an Array
401644 [lists@ru y- ] I have been working with ranking algorithm, wich collects the smallest
+ 401645 [lists@ru y- ] so what does "not work" mean? I don't know your StortedArray class (or
+ 401746 [lists@ru y- ] => -1
+ 401748 [lists@ru y- ] => nil
+ 401750 [matma.rex@gm] Uhh... how about ary.sort.first(n)?
| + 401751 [jgabrielygal] You lose the relative ordering of the chosen elements. Don't know if
| | 401752 [ivan.bisevac] n = [4, 6, 7, 2, 15]
| | 401756 [lists@ru y- ] Great, you've reimplemented Array#min.
| + 401758 [lists@ru y- ] Of sort complexity id O(n*log(n), i thought that sorting the complete
+ 401759 [shortcutter@] - you are creating a lot temporary arrays (two for each step)
401761 [lists@ru y- ] You compar ruby implementation for n_min() with c implementation for
401763 [shortcutter@] Is that forbidden?  You are making use of C implementation as well.
401764 [frank-fische] I agree with Robert, using #sort is probably the simplest approach and
401789 [shortcutter@] I put a few more variants which traverse the original Enumerable just

Error in Bones plugin ann.rb: undefined method `empty?' for :desc:Symbol
401653 [lists@ru y- ] A newbie to Ruby, running rake in the gem directory causes the following

401654 [ryand-ruby@z] vlad version 2.3.1 has been released!

gem problems(sigh)
401655 [lists@ru y- ] i tried to make a gem and tried to build the spec file and this is what
+ 401656 [   ar@le .m ] You look like you're in the lib directory, but the gemspec would usually be one directory up.
+ 401657 [lists@ru y- ] tried that and got
| 401659 [   ar@le .m ] Does the file "string_extensions.gemspec" actually exist? You have to have written one of these yourself.
+ 401661 [lists@ru y- ] yes i created it and stored in the 'lib' of "string_extensions"
| 401662 [   ar@le .m ] As per earlier comment, I don't think it should be in "lib", but in the directory containing "lib". If it still doesn't work despite that, I'm not sure what's going on.
+ 401663 [lists@ru y- ] string_extensions.gemspec
| 401664 [   ar@le .m ] It looks fine to me. The warnings are just mentioning things not specified in the gemspec.
+ 401665 [lists@ru y- ] ok. question? would i add that info in by typing "s.dscription =
401673 [   ar@le .m ] More or less. You can see here the full list of attributes: http://docs.rubygems.org/read/chapter/20

installing glib on windows?
401658 [lists@ru y- ] I am getting an error when I try to install a couple of related gems.

[ANN] minitest 4.3.2 Released
401660 [ryand-ruby@z] minitest version 4.3.2 has been released!

Loosing focus on IE-watir webdriver
401666 [lists@ru y- ] Greetings,
401670 [lists@ru y- ] IE needs to be in focus because of the way it handles events. There are

Selenium IE driver not reliable?
401668 [lists@ru y- ] If I am not mistaken we use selenium IE webdriver for testing using

Using model methods without an object for that model
401672 [lists@ru y- ] batches. I have model called kpivalues but the standard rest rules
401702 [lists@ru y- ] Ha, I think this one was better on the ruby on rails space of the forum.
401704 [peterhickman] The basic RoR practice is to have 'thin' controllers. So the controller
401705 [lists@ru y- ] Yeah Thanks Peter. Agree! Too much text on the original question. Sorry

CGI question
401674 [lists@ru y- ] Ruby Beginner question.
+ 401675 [lists@ru y- ] CGI scripts are executed by a webserver like Apache. It makes no sense
| 401727 [ryand-ruby@z] 10001 % ruby19
| + 401729 [lists@ru y- ] I did not mean it's impossible. Of course CGI scripts are normal
| + 401749 [lists@ru y- ] Thanks Ryan, That definitely did the trick.
+ 401677 [fluido@fl id] I have no experience with the cgi package at all, but the message is
| 401679 [prasad.c82@g] entering control-z will print the html contents on the console,
+ 401731 [eliezer@ng e] Hey Assaf,

How to know in which class we are when inheriting
401676 [lists@ru y- ] class One
401678 [lists@ru y- ] the "self" keyword is always resolved in the current context. So when
401681 [lists@ru y- ] Well, it is more complicated what i want to do... but doint it like you
401682 [shortcutter@] Well, but that's the way it is. :-)
401683 [lists@ru y- ] Hey Robert it doesn't work for me that way, i'm using 1.8.7 and i cannot
401699 [shortcutter@] I am surprised that 1.8 behaves differently.  What happens if you
401703 [lists@ru y- ] undefined method `add_assertion' for nil:NilClass (NoMethodError)

(none)
401680 [mikestar13@s] ...

Multidimensional Array
401687 [lists@ru y- ] Currently I am using Ruby and a beginner
+ 401690 [lists@ru y- ] what do you mean by 'value1'? Do you want to convert the value into a
+ 401691 [af17g11@gm i] your_array = [[value1, value1_other1 ,value1_other2], [value2,
| 401728 [lists@ru y- ] new_array = data.collect do |y|
+ 401701 [lists@ru y- ] Thanks a lot for the help , tried

sorting data from a file
401688 [lists@ru y- ] Hey guys,
+ 401689 [lists@ru y- ] what have you got so far? Are the lines in number arrays already?
+ 401693 [lists@ru y- ] I haven't done any thing yet.. i just didn't know where to start.
| + 401694 [lists@ru y- ] What about parsing the file?
| + 401695 [af17g11@gm i] Documentation for Ruby is here
|   401696 [travis@tr vi] How do I unsubscribe?
+ 401697 [lists@ru y- ] of course I see your point Jan E.
| + 401698 [wbrisett@at ] Read the blog entry I sent earlier. It will all make sense once you read it
| + 401700 [af17g11@gm i] Write a script "script.rb" and run it from the command line by typing
|   401709 [lists@ru y- ] IO.foreach(fname) {|line| #code here}
|   401710 [af17g11@gm i] I think the problem for somebody who knows very little Ruby will be =
+ 401716 [lists@ru y- ] You can argue all day long about which solution is easier to understand
| 401737 [ivan.bisevac] It's beginner question. My advice is that you go through some beginners
| 401738 [ivan.bisevac] @csv.each do |row|
+ 401783 [lists@ru y- ] i have a txt file which contains numbers as mentioned earlier..then i

Newbie question: (free) on-line courses?
401706 [ken@jo s. rg] CSS, etc., etc., but I haven't found anything of the sort for Ruby.  I
+ 401707 [sduncan@we a] Have you had a look at this?
+ 401714 [lists@ru y- ] The Book is tells a bizzare, yet funny story while teaching the reader
| 401719 [sto.mar@we .] Depends.
| + 401726 [echristopher] Our own Josh Cheek's Ruby Kickstart:  http://ruby-kickstart.com/
| | 401831 [josh.cheek@g] Aww ^_^
| + 401732 [alexandermcm] ...
|   401734 [carlos.agari] You can do a LOT with these three.
|   401735 [ivan.bisevac] online course for Software as a Service with Ruby in mind.
+ 401823 [shortcutter@] The first edition of the Pickaxe is a bit dated but still a good

Looking for a Ruby Demo That is Database Heavy
401708 [lists@ru y- ] I am looking for a reasonably complex, Open Source, Ruby DEMO.
401824 [shortcutter@] Robert, you make me curios: what hardware do you need for the 1+ million TX?

Page Objectt design with Selenium Watir-Webdriver
401711 [lists@ru y- ] I'm a newbie in both Ruby and Selenium watir-webdriver and want to ask
+ 401792 [lists@ru y- ] As far as I can see you haven't required 'startpage', and I think you'll
| 401804 [lists@ru y- ] To start with a big thank you for you anwers Joel!
+ 401805 [lists@ru y- ] You're using an instance variable '@' for your browser. I think if

I have a CGInquiry.
401712 [lists@ru y- ] i'm using this example in BEGINNING RUBY of using a cgi code and got
401715 [sto.mar@we .] The exact same question has been answered just a couple of hours ago.

class method defined, still undefinded method exeption
401713 [lists@ru y- ] i try to untangle tightly coupled classes. To that end theres a class to
+ 401717 [lists@ru y- ] ~/ruby_programs\$ ls
+ 401718 [   ar@le .m ] ./video.rb:11:in `initialize': undefined method `screen' for RA:Class
+ 401720 [lists@ru y- ] Thank you, problem solved, understanding gained. Since the call to
+ 401721 [lists@ru y- ] What are you here for? Do you think he's faked the error messages or

This is not working.
401724 [lists@ru y- ] puts 'Level 1'
401725 [stefano.croc] cal is a string. 1 + 1 is a number (class Fixnum to be precise). A string

401730 [lists@ru y- ] I'd like to have const_missing return a class that would do the
401745 [lists@ru y- ] Been thinking more about this, and although I still think it is a
+ 401747 [lists@ru y- ] def method_missing(meth, *args, &block)
+ 401757 [lists@ru y- ] Flyweight is a misnomer since is not implementing flyweight pattern.

Simple script not working
401733 [lists@ru y- ] require 'rubygems'
+ 401736 [lists@ru y- ] It looks like your browser can't establish a connection. Firewall?
| 401739 [lists@ru y- ] I can see that it opens few ie window and then throws the error. Even on
| 401742 [shortcutter@] You may also fall victim of a connection count restriction as is
| 401744 [lists@ru y- ] But I am opening only 5 browsers at a time.
| 401903 [lists@ru y- ] How many browsers can you use like this before you experience the error?
+ 401755 [lists@ru y- ] I've also seen that error before when the browser is closed in the
401900 [lists@ru y- ] How can it be triggered without reason?

Trouble with Chronic
401740 [lists@ru y- ] I've decided to try Chronic to make it easier (hopefully) to get certain
+ 401741 [ryand-ruby@z] certain
+ 401743 [lists@ru y- ] Thanks, that never occurred to me!
| 401765 [ryand-ruby@z] I=20
+ 401768 [lists@ru y- ] I'd resigned myself to using Time since the only help I could find for
+ 402293 [lists@ru y- ] def get_end_of_last_month

removing directories
401753 [lists@ru y- ] I've googled around and I've discovered that "FileUtils.rm_rf('#{dir}')
+ 401754 [fluido@fl id] When strings are included in single quotes, #{} expansion does not
+ 401762 [lists@ru y- ] Thanks, Carlo. I actually figured this out myself, googling around. I
+ 401786 [alexandermcm] ...
+ 401797 [alexandermcm] ...
| 401798 [lists@ru y- ] Beautiful! Thank you.
+ 401799 [lists@ru y- ] Great stuff. Thank you very much.

watir web driver vs watir
401760 [lists@ru y- ] with ie web driver, so people suggested me to go for watir.
401905 [lists@ru y- ] I don't know the answer to this but I'd be interested to find out. If
401906 [lists@ru y- ] 1. change require 'watir-webdriver' to require 'watir'

convert hash to array index value
401766 [lists@ru y- ] when we convert a hash to array.it takes one key value pair as a one
+ 401767 [hmaddocks@me] person.to_a returns a new Array, it doesn't convert person to an Array.
+ 401790 [shortcutter@] What "index number"?  A Hash is not indexed by number - unless you

The last call for Fukuoka Ruby Competition! - Ruby Nights' videos are available!
401769 [lists@ru y- ] This is a reminder that Fukuoka Ruby award competition entry deadline is

An example in Exception Handling with Ruby.
401770 [lists@ru y- ] Source file is attached.  I'm new to this forum so I don't know if there
+ 401774 [lists@ru y- ] Sorry the link above is broken.
+ 401776 [lists@ru y- ] I updated the file and added comments.
401822 [shortcutter@] All three codepad links came up 404.  How clever is that?

Is MONGREL a dirty cur?
401771 [lists@ru y- ] irb(main):001:0> require 'rubygems'
+ 401773 [stu@ru yp og] Look into unicorn.
+ 401775 [tony.arcieri] Puma is a modernized and maintained version of Mongrel

Ordered Hash (v. 1.8)
401772 [lists@ru y- ] I am running Ruby v. 1.8.7 and I have installed the orderedhash gem.  I
+ 401777 [sto.mar@we .] 1. You could use the RBTree gem.
| 401779 [sto.mar@we .] sorted_keys = hash.keys.sort_by(&:to_s)
| 401781 [sto.mar@we .] hash = {:c => 1, :a => 2, :b => 3}
+ 401778 [list.push@gm] Does this work?
| 401780 [sto.mar@we .] not in Ruby 1.8!
+ 401782 [list.push@gm] # If you want to also keep the original order, maybe this is worth a look.
| 401794 [sto.mar@we .] This does not work in 1.8, because hashes in 1.8 do
| 401795 [shortcutter@] That's why Doug had installed the OrderedHash Gem I guess.  So with a
+ 401802 [transfire@gm] ...
+ 401853 [lists@ru y- ] Thanks to all who contributed in this thread. Using your valuable
```