[#403748] Why Array#include? not working withone liner integer arrays? — Arup Rakshit <lists@...>
I was trying to write a one liner with integer array using
On 01/31/2013 11:01 PM, Arup Rakshit wrote:
[#403770] Novice: self, @self.respond_to? and dynamically built methods — Steve Tu <lists@...>
I have been plodding through a Ruby tutorial and came across the
Am 01.02.2013 12:36, schrieb Steve Tu:
[#403794] Enumeration vs Enumerable — Arup Rakshit <lists@...>
Can anyone explain what "Enumeration" is? What it does and when a
Hello,
Calvin B. wrote in post #1094810:
[#403802] IRB equivalent to windows cmd if any? — Arup Rakshit <lists@...>
I am currently using ruby 1.9.3. But till now i am using windows command
[#403830] Confusion with Enum#with_index — Arup Rakshit <lists@...>
I was playing to understand the method "Enum#with_index" with the below
[#403837] Why none of the block giving the expected output with the "enumerator"? — Arup Rakshit <lists@...>
Why none of the block giving the expected output with the "enumerator"?
On Sunday 03 February 2013 Arup Rakshit wrote
Stefano Crocco wrote in post #1094918:
On Sunday 03 February 2013 Arup Rakshit wrote
Stefano Crocco wrote in post #1094920:
[#403846] Open file that its name given by STDIN.gets — aref aslani <lists@...>
Hi all. I'm following the Zed Shaw's ruby tutorials.
[#403856] Class for data analysis: File.open once — Soichi Ishida <lists@...>
ruby 1.9.3p362 (2012-12-25 revision 38607) [x86_64-darwin12.2.1]
[#403857] Easy way to handle positional and hashed parameters on a method? — tamouse mailing lists <tamouse.lists@...>
Ideally, I'd like to be able to offer either of these on an API I'm creating:
[#403869] Storing string-data in a module — Marc Heiler <lists@...>
Hi.
[#403870] Confusion with Enum#with_object block argument construct — Arup Rakshit <lists@...>
C:\>irb
the array at with_object collects the elements but:
Hans Mackowiak wrote in post #1095038:
On 4 February 2013 17:02, Love U Ruby <lists@ruby-forum.com> wrote:
Matthew Kerwin wrote in post #1095078:
[#403883] couldn't hit a button using selenium-webdriver — Arup Rakshit <lists@...>
**Code:**
[#403890] Can we open a page in a new tab in the same browser using selenium-webdriver? — Arup Rakshit <lists@...>
driver = Selenium::WebDriver.for :firefox
[#403891] BrowserCMS demo project creation problem — "Tom C." <lists@...>
I hope this is the place to post this. If it's the Rails list, let me
[#403914] Nokogiri scraping multiple URLs — Barry Kavanagh <lists@...>
I am new to Ruby and Nokogiri so excuse my lack of knowledge. I am
[#403920] Character classes use in Ruby — Love U Ruby <lists@...>
Can anyone help me by giving an explanatory example of each of the
my-ruby:
Hans Mackowiak wrote in post #1095104:
[#403935] How to stop page loading using selenium-web driver? — Love U Ruby <lists@...>
How to stop page loading using selenium-web driver?
[#403945] Nokogiri - Data output not as expected — Barry Kavanagh <lists@...>
Sorry for bothering the forum about this but it is extremely
Thank you for your explanation Jesus but I am just not sure where to
On Mon, Feb 4, 2013 at 5:01 PM, Barry Kavanagh <lists@ruby-forum.com> wrote:
[#403964] Will we have ruby 2.0 before 1.8 dies? — Marc Heiler <lists@...>
Hi,
[#403969] How to increase flexibility of #flatten — Tom Stut <lists@...>
I am trying to use flatten to change
[#403972] Ruby could recognize the values when putting into a webpage text filed. — Love U Ruby <lists@...>
Hi,
how do you read the csv file?
Hans Mackowiak wrote in post #1095331:
I am just saying that the browser thinks the information it is receiving is
[#403975] Financial models using Ruby — Dwayne Henderson <its.code.in.here@...>
I'm working on this financial
[#403986] old syntax? what's going on here — tamouse mailing lists <tamouse.lists@...>
I have this in a _spec.rb file: (a gem I inherited at work)
Subject: old syntax? what's going on here
On Tue, Feb 5, 2013 at 7:47 AM, Carlo E. Prelz <fluido@fluido.as> wrote:
On Tue, Feb 5, 2013 at 7:52 AM, tamouse mailing lists
[#404005] Implementing DRY with a function call — Rob Marshall <lists@...>
Hi,
[#404006] using an instance variable inside a method — FirstName Surname <lists@...>
Hello.
I'm a couple weeks as a Ruby newby ... writing a fun puzzle and ran into
I see, i thought that you could use these accessors only outside the
On 6 February 2013 07:26, FirstName Surname <lists@ruby-forum.com> wrote:
[#404014] Is there anyway to get all the class with their instance methods names to be available and to see th — Love U Ruby <lists@...>
Is there anyway to get all the class with their instance methods names
[#404021] Not able get the label text incurred with <input> element — Love U Ruby <lists@...>
I do have a below `HTML`:
The text is in the div, not linked to the checkboxes. Looks like poorly
why not try it yourself? or read what others say:
I think this should do it:
Joel Pearson wrote in post #1095530:
[#404025] Symbol.defined? — Student Jr <lists@...>
Symbol deserialization from external sources is now known to be
[#404041] Expanding gemspecs — Jon Cairns <lists@...>
Hi everyone, I've got a question about the existence or potential
[#404047] unicorn 4.6.0 - Rack HTTP server for fast clients and Unix — Eric Wong <normalperson@...>
Unicorn is an HTTP server for Rack applications designed to only serve
[#404058] Ruby 1.9.3-p362 on Mac OSX — Peter Bailey <lists@...>
Hi,
The following:
Jon Cairns wrote in post #1095548:
On Wed, Feb 6, 2013 at 7:48 AM, Peter Bailey <lists@ruby-forum.com> wrote:
On 6 February 2013 15:48, Peter Bailey <lists@ruby-forum.com> wrote:
Jon Cairns wrote in post #1095551:
[#404082] Problem building Ruby 1.9.3 patchlevel 385 under AIX 7.1 — Ruby Student <ruby.student@...>
Hello World!
Anybody there? Anybody at all!
On Thu, Feb 28, 2013 at 6:43 AM, Ryan Davis <ryand-ruby@zenspider.com> wrote:
[#404094] How to pass established/defined arrays into def method. — Tom Stut <lists@...>
I am trying to pass a defined array into a method. Ruby is interpreting
On Wed, Feb 6, 2013 at 7:25 PM, Tom Stut <lists@ruby-forum.com> wrote:
[#404101] Issues from an extreme beginner — Bruce Palmer <lists@...>
Hey guys, great to be part of such a great community! I look forward to
Ahh, thank you Matthew! That was just the push I needed!
On Wed, Feb 6, 2013 at 10:43 PM, Bruce Palmer <lists@ruby-forum.com> wrote:
Hassan Schroeder wrote in post #1095774:
On 8 February 2013 06:39, Bruce Palmer <lists@ruby-forum.com> wrote:
on the side-track in case the name has only one character then the word
[#404113] how to skip lines whenever there is an error? — Love U Ruby <lists@...>
Hi,
Love U Ruby wrote in post #1095742:
[#404123] Why the speed? — Jesper Bukkehave <lists@...>
Attention!! Noob warning :)
[#404127] Help with the following program please — "Wayne E." <lists@...>
Can anyone help me put this program together. It is crucial.
On Thu, Feb 7, 2013 at 5:30 PM, Wayne E. <lists@ruby-forum.com> wrote:
I was trying to see if I could get some help on a few of the smaller
[#404183] Best way to interact with samba — Mauro Mauro <lists@...>
Hi all,
> I need to move some files from a linux to a widnows machine.
[#404189] New to ruby - need assistance with rewriting a script — Ronald Craft <lists@...>
Hello,
[#404208] elegant way to determine if something is defined — tamouse mailing lists <tamouse.lists@...>
Something like:
Subject: elegant way to determine if something is defined
On Sun, Feb 10, 2013 at 7:39 AM, Carlo E. Prelz <fluido@fluido.as> wrote:
Subject: Re: elegant way to determine if something is defined
On Mon, Feb 11, 2013 at 8:05 AM, Carlo E. Prelz <fluido@fluido.as> wrote:
On Sun, Feb 10, 2013 at 4:09 AM, tamouse mailing lists
[#404211] Why doesn't Ruby have a built in sandbox class? — Ano Hito <lists@...>
After having some trouble getting the j-ruby sandbox gem to work
On Sun, Feb 10, 2013 at 10:45 AM, Ano Hito <lists@ruby-forum.com> wrote:
Robert Klemme wrote in post #1096190:
I posted a strawman for something similar a few days ago. It's a bit
[#404218] Ruby Equivalent to VB's "With"? — Joel Pearson <lists@...>
I've looked around but I couldn't find anything helpful on this,
[#404231] firtst and only element of array (noob level) — Ronnie Aa <lists@...>
Hello people,
Am 11.02.2013 13:27 schrieb "Ronnie Aa" <lists@ruby-forum.com>:
Thomas Preymesser wrote in post #1096273:
Subject: Re: firtst and only element of array (noob level)
Carlo E. Prelz wrote in post #1096281:
[#404235] The "ruby way" to do desktop applications? — "guirec c." <lists@...>
Hello,
I've built a few simple desktop apps using Ruby, Tk, and Ocra.
For exemple, I want to create an application to manage a small business.
Subject: Re: The "ruby way" to do desktop applications?
[#404238] Best books for "advanced" programmers — "guirec c." <lists@...>
Hello,
@Dave Aronson
Good Books on Ruby functional programing - any reference?
Not necessarily Ruby, but gets you in the mindset: The little Schemer
[#404242] Playing with DSLs, a question or two — Peter Hickman <peterhickman386@...>
I am playing around with writing some DSLs to help me get more familier
[#404245] Issue with Excel column values read. — Love U Ruby <lists@...>
Hi,
And how many select lists do you use which take floats?
Joel Pearson wrote in post #1096351:
Looking at your previous example list, you're right you have a mixture. But the
Wayne Brisette wrote in post #1096356:
If you already know it has to be an integer, use ".to_i", or "Integer()"
[#404262] RDoc in latest version — RKA <roshkins@...>
Hello Kind people in Rubyland,
I think this is just a different "skin" or "theme" for RDoc. The command-line interface and the data is still the same; it's just displayed in a prettier way.
[#404280] How to see the all keys of "RbConfig::CONFIG" ? — Love U Ruby <lists@...>
How to see the all keys of "RbConfig::CONFIG" ?
[#404312] text include, searching using a part of the word, storing the whole word if found — Horváth Alex <lists@...>
Hey guys,
[#404344] Ruby command line options s and S — Love U Ruby <lists@...>
Can anyone help me to understand the difference between s and S with
On Wed, Feb 13, 2013 at 3:59 PM, Love U Ruby <lists@ruby-forum.com> wrote:
"Jes炭s Gabriel y Gal叩n" <jgabrielygalan@gmail.com> wrote in post
You can see the contents of the variable using echo:
[#404349] How to exit from the forever loop when using "-np" switch ? — Love U Ruby <lists@...>
I was trying to see the how they(-n,-p) works in ruby?
On Wed, Feb 13, 2013 at 4:55 PM, Love U Ruby <lists@ruby-forum.com> wrote:
Robert Klemme wrote in post #1096696:
[#404370] Confusion with Ruby command line options — Love U Ruby <lists@...>
Can any one help me to understand when and how to use the below two Ruby
[#404371] Error is coming with ruby commandline option "-d" — Love U Ruby <lists@...>
Hi,
That's simply what -d does – it prints all exceptions that ever happen in your code, even if they are rescued.
[#404372] file size of each item in file list — Sloan Ruby <lists@...>
I am trying to take the contents of a file which contains the results of
This is what I have now. I am not able to print out each line of the
On Wed, Feb 13, 2013 at 3:08 PM, Sloan Ruby <lists@ruby-forum.com> wrote:
[#404382] Can't load gems — Loran Kary <lists@...>
I have installed rvm on my Mac OSX and Ruby 1.9.3 and I also installed
Ryan Davis wrote in post #1096802:
[#404386] Re: Ruby command line options s and S — "D. Deryl Downey" <me@...>
Dude!
Humm!
On Thu, Feb 14, 2013 at 9:15 AM, Love U Ruby <lists@ruby-forum.com> wrote:
[#404387] Ruby Multithreaded producer-consumer problem — Abhijit Sarkar <lists@...>
Hi,
Subject: Ruby Multithreaded producer-consumer problem
Carlo E. Prelz wrote in post #1096828:
Bump!
On Sun, Feb 24, 2013 at 1:30 AM, Abhijit Sarkar <lists@ruby-forum.com> wrote:
First of all, Sean's modified version works!. It does not run into the
On Sun, Feb 24, 2013 at 4:51 PM, Abhijit Sarkar <lists@ruby-forum.com> wrote:
On Sun, Feb 24, 2013 at 4:23 PM, Robert Klemme
I rewrote the code using MonitorMixin and then back to using Mutex, same
Abhijit Sarkar wrote in post #1097009:
Love U Ruby wrote in post #1097084:
[#404407] Best DRY way to write bang versions of methods? — Joel Pearson <lists@...>
I've been wondering about the best way to quickly create a "bang"
[#404429] What are lambda functions used for? — Mike Glaz <lists@...>
I'm new to Ruby and lambda functions. I understand how they work but
[#404456] skip iteration in each loop — Saurav Chakraborty <lists@...>
I want to skip iteration for few values depending on dynamic condition.
[#404464] Ruby "visionary" code — Elr0ndK Asda <lists@...>
I found that code in the actual codebase of a web app I'm working on.
[#404485] Re: Ruby Multithreaded producer-consumer problem — "D. Deryl Downey" <me@...>
You don稚 get to start telling people that after all the un-googled,
D. Deryl Downey wrote in post #1097087:
I think he was talking to "Love U Ruby" not you...which means all of his
Ryan Victory wrote in post #1097122:
[#404491] so, what's the proper way to replace funcionality of GOTO ? — "Stu P. D'naim" <lists@...>
I need to make few scripts for tasks I do often manually, but last time
Stu P. D'naim wrote in post #1097111:
Love U Ruby: I'm really not sure what you meant by that response, but
Ryan Victory wrote in post #1097114:
I did consider jokingly showing the "enable jokes" compiler flag that
I think GOTO gets a bad rap. Actually, I find the COMEFROM command far more terrifying. It's mentioned in the comments...
i recall the Amiga thrived on tons of GOTO 's
callcc is one way to do a functional programming style goto statement
Yeah, I realized that...still doesn't make him right :-)
Actually this makes him pretty much the definition of right.
Be careful saying "no one uses BASIC nowdays". I have no doubt there is
There is no one way to replace GOTO. GOTO is at the heart of many structured control structures. What you need to do is think about what you are trying to do and where you are trying to go when you are done.
hash inside hash menus, interesting, same as Robert Klemme's example ...
[#404517] How do you associate the items of a collection instance with the collection in a smart Ruby way? — "Jesse F." <lists@...>
This is a conceptual question about Ruby. I think I may be thinking of
[#404528] Fun with finalizers — Garthy D <garthy_lmkltybr@...>
[#404533] Confusion with Ruby printing mechanics. — Love U Ruby <lists@...>
Here I just played to see how printing statement behaves with "nil"
[#404557] How the string concatenation operator hackes(modifies) the string contents of frozen array? — Love U Ruby <lists@...>
Hi,
humm, You are correct.
[#404560] makerakeworkwell 1.0.2 Released — Ryan Davis <ryand-ruby@...>
makerakeworkwell version 1.0.2 has been released!
[#404570] What is Ruby's default constructor? — Love U Ruby <lists@...>
Hi,
[#404628] Re: Adding camelize and underscore to String — tamouse mailing lists <tamouse.lists@...>
On Mon, Feb 18, 2013 at 12:07 AM, Rob Marshall <lists@ruby-forum.com> wrote:
On Mon, Feb 18, 2013 at 9:23 PM, tamouse mailing lists <
On Tue, Feb 19, 2013 at 4:45 AM, Josh Cheek <josh.cheek@gmail.com> wrote:
[#404632] Re: splat operator and Ruby instance variable assignments — Marc Heiler <lists@...>
Ok, understood what the guy wants ...
Marc Heiler wrote in post #1097736:
Ryan Davis wrote in post #1097840:
On 19 February 2013 20:35, Love U Ruby <lists@ruby-forum.com> wrote:
Peter Hickman wrote in post #1097848:
On 19 February 2013 21:22, Love U Ruby <lists@ruby-forum.com> wrote:
On Tue, 19 Feb 2013 22:37:59 +0100, Peter Hickman <peterhickman386@googlemail.com> wrote:
Always interesting when people bring out the proverbs
[#404668] variable editing in ruby (like zsh vared) — "R. Kumar" <lists@...>
I am redoing some zsh apps in ruby (commandline). One functionality was
[#404679] Python C API vs Ruby C API — Patrick <patrick@...>
Hi Everyone
[#404680] Fixnum: freeze status on ruby 2.0.0 rc2 — Enrico Rivarola <lists@...>
Hi,
[#404695] Instalation problem — "Carlos A." <lists@...>
HI!!
[#404696] THE CLASS/OBJECT CHICKEN-AND-EGG PARADOX — "Xavier R." <lists@...>
Hi,
Maybe you could provide more detail about what you are confused about. To
Matt Mongeau wrote in post #1098058:
It's not really a paradox. Take for example
Matt Mongeau wrote in post #1098076:
[#404697] Rdoc cannot find ruby files — Hakim Benbekhti <lists@...>
I am new to ruby and I am going through Peter Cooper’s book (Novice to
Thank you for the suggestion but no case sensitivity is not a problem.
[#404707] How meta class differs from real class ? — "Xavier R." <lists@...>
In Ruby-
[#404738] backslash substitution — Mario Ruiz <lists@...>
don't know why... but this is not working
Subject: backslash substitution
Yes I know.. but i cannot change the string... the string it is like it
Subject: Re: backslash substitution
you mean by using gsub... in the expample i posted i tried but didn't
[#404747] Using Mechanize gem to automate some tasks on Facebook — Bao Trung Tran Nguyen <trannguyenbaotrung@...>
Dear friends,
[#404749] Questionable regex performance when using lazy matching and inverted character classes — "Tikhon B." <lists@...>
Hi All,
On Thu, Feb 21, 2013 at 12:12 PM, Tikhon B. <lists@ruby-forum.com> wrote:
Robert Klemme wrote in post #1098199:
On Fri, Feb 22, 2013 at 1:21 AM, Tikhon B. <lists@ruby-forum.com> wrote:
[#404757] Difference between pretty_print_cycle and pretty_print. — Love U Ruby <lists@...>
From the link I found the two methods :
[#404770] Class method's has a fuzzy meaning and a sharp meaning — "Xavier R." <lists@...>
David A. Black in his book - "The Well-Grounded Rubyist"
[#404809] Difference of 2 dates interms of years. — "Xavier R." <lists@...>
how can we get the experience years between two dates(ex:2012-01-11 to
Post some things you've tried.
How might you modify that to handle years?
Matt Mongeau wrote in post #1098486:
[#404817] Not able to understand the difference between "||=" and "|=". — "Xavier R." <lists@...>
>> a = []
On the same road I tried to the "&&=" as below :
On 02/22/2013 01:08 PM, Xavier R. wrote:
Justin Collins wrote in post #1098508:
[#404839] range is not assigning to the splat variable. — Love U Ruby <lists@...>
Why splat variable couldn't take in the below two code the "range" ->
Splat is an array, Rang is not an array.
On Sat, 23 Feb 2013 07:08:05 +0100, Matthew Kerwin <lists@ruby-forum.com> wrote:
On 23 February 2013 18:52, Bartosz Dziewoナгki <matma.rex@gmail.com> wrote:
On Sat, 23 Feb 2013 13:44:25 +0100, Matthew Kerwin <matthew@kerwin.net.au> wrote:
[#404842] Why class returning its own name when "include" statement? — Love U Ruby <lists@...>
I was actually playing around with the class definition return values.
@Stefano Yes you are right. The below code is proved that.
On Feb 23, 2013 2:21 AM, "Love U Ruby" <lists@ruby-forum.com> wrote:
tamouse mailing lists wrote in post #1098808:
Am 23.02.2013 09:20, schrieb Love U Ruby:
[#404853] Regarding the instantiation relations in Ruby? — Love U Ruby <lists@...>
Is the below statement holds true in the course of instantiation
[#404867] how to see the class creation time in Ruby? — Love U Ruby <lists@...>
In Ruby any chance to see the last-modified time of a specific class?
Ohh! here I tried but none of them worked.
Xavier R. wrote in post #1098609:
[#404886] why "Range" not worked on "to_ary" ? — "Xavier R." <lists@...>
>> (1..9).to_a
[#404901] Confusion with `nil` value being produced by IRB in case of Array#size manipulation. — Love U Ruby <lists@...>
enum[int] = obj → obj
its because ruby does not make a difference in Array#[] if the element
Hans Mackowiak wrote in post #1098729:
Am 24.02.2013 13:26, schrieb Love U Ruby:
Have you even tried to read the documentation???
unknown wrote in post #1098721:
[#404914] How to create a new database in ruby with sqlite3? — Hakim Benbekhti <lists@...>
Here is what I wrote on my Terminal. I tried different ways of writing
[#404921] How should I print only the last combination when using Array#combination(n) ? — Love U Ruby <lists@...>
>> a = [1,2,3]
see the below code :
a.combination(2).reverse_each.first #=> [2, 3]
On Sun, Feb 24, 2013 at 8:55 AM, Love U Ruby <lists@ruby-forum.com> wrote:
tamouse mailing lists wrote in post #1098785:
On Sun, Feb 24, 2013 at 9:15 AM, Love U Ruby <lists@ruby-forum.com> wrote:
[#404943] How to upgrade ruby to the latest version in ubuntu ? — Love U Ruby <lists@...>
@ubuntu:~$ ruby -v
you can use brightbox's ppa
Kiswono Prayogo wrote in post #1098865:
[#404956] RubyInstaller 2.0.0-p0 released — Luis Lavena <luislavena@...>
In combination with the rest of the RubyInstaller team, I'm very
On Sun, Feb 24, 2013 at 7:05 PM, Tim0 <tigre7t@gmail.com> wrote:
[#404969] Possible mruby bug in mrb_load_string — Garthy D <garthy_lmkltybr@...>
[#404981] Ruby String directives — "Kumar R." <lists@...>
Hi guys,
[#405000] no element found error with selenium-webdriver — Love U Ruby <lists@...>
For the below code I am getting error as "no element found"
[#405003] Help..Newbe to Ruby — "shaji n." <lists@...>
Greetings
Microsoft Windows XP [Version 5.1.2600]
[#405020] undefined local variable or method `m' — Love U Ruby <lists@...>
>> class Test
[#405025] Confusion with self within methods. — Love U Ruby <lists@...>
To see who is playing the role of `self` in `nested methods`, I tried
Doing more play with it I found the below code:
How about reading a Ruby book or two, or working through
[#405026] Please, help (GCD) greatest common divisor. — Caddy Tonks Lupin <lists@...>
Write a program to read two integers and show their greatest common
Best I could do on short notice:
On Tue, Feb 26, 2013 at 12:48 PM, Bartosz Dziewoナгki
Hello Everyone,
Caddy:
Wayne Brisette wrote in post #1099174:
Don't you think you'd learn better if you actually tried to figure it
[#405032] Does 'gem list' go by .gemspec only? — Ron Lipke <lists@...>
Hello, Ruby beginner here trying to learn as much as I can.
[#405033] Get it on one line? — Patric Åberg <lists@...>
Hello pros!
[#405053] Programming Ruby 2.0 ? — "Jabari Z." <lists@...>
Has anyone heard about a Programming Ruby 2.0 edition coming out?
Yes, there's work going on. Dave Thomas asked some days ago on the
[#405059] Does this specific sound library exist? — Dirk Vogel <lists@...>
Hi there,
[#405067] Mac OS 10.8.2 and openssl — "Dr. Hegewald" <hegewald@...>
Hi everybody,
Subject: Mac OS 10.8.2 and openssl
Hi Carlo and all,
Subject: Re: Mac OS 10.8.2 and openssl
Hi Carlo and all,
Subject: Re: Mac OS 10.8.2 and openssl
On Wed, Feb 27, 2013 at 3:32 AM, Dr. Hegewald <hegewald@irmb.tu-bs.de> wrote:
[#405079] Why `10` not returned without the `return` from the block ? — Love U Ruby <lists@...>
CODE - I
But why mean to say when the below code works:
I seriously believe now that you are trolling this list. I, for one, am
[#405107] Object track llist for a particular class. — "Xavier R." <lists@...>
Say I have created more than one instances from a particular class as
Hash[local_variables.map {|k| [k,eval(k.to_s)]}]
Hans Mackowiak wrote in post #1099426:
[#405134] Match array1 with array2 — "Mattias A." <lists@...>
Hi,
[#405145] Discussion on Ruby's `alias` — Tukai Patra <lists@...>
>> class Foo
On 28.02.2013 12:34, Tukai Patra wrote:
[#405175] telnet - how to loop through commands listed in a file — Bob Ford <lists@...>
Let me first explain what I'm trying to do. I have written a very
Hmmm, The files are entered from the command line using a getopt (e.g -f
Am 05.03.2013 19:07, schrieb Bob Ford:
I've now run into a little conundrum. There is one command that can
ANN: Sequel 3.44.0 Released
Sequel is a lightweight database access toolkit for Ruby.
* Sequel provides thread safety, connection pooling and a concise
DSL for constructing SQL queries and table schemas.
* Sequel includes a comprehensive ORM layer for mapping records to
Ruby objects and handling associated records.
* Sequel supports advanced database features such as prepared
statements, bound variables, stored procedures, savepoints,
two-phase commit, transaction isolation, master/slave
configurations, and database sharding.
* Sequel currently has adapters for ADO, Amalgalite, CUBRID,
DataObjects, DB2, DBI, Firebird, IBM_DB, Informix, JDBC, MySQL,
Mysql2, ODBC, OpenBase, Oracle, PostgreSQL, SQLite3, Swift, and
TinyTDS.
Sequel 3.44.0 has been released and should be available on the gem
mirrors.
= New Features
* Dataset#paged_each has been added, for processing entire datasets
without keeping all rows in memory, even if the underlying driver
keeps all query results in memory. This is implemented using
limits and offsets, and requires an order (model datasets use a
default order by primary key). It defaults to fetching 1000
rows at a time, but that can be changed via the :rows_per_fetch
option.
This method is drop-in compatible for each. Previously, the
pagination extension's each_page method could be used for a
similar purpose, but users of each_page are now encouraged to
switch to paged_each.
* Sequel now recognizes constraint violation exceptions on most
databases, and will raise specific exceptions for different
types of constraint violations, instead of the generic
Sequel::DatabaseError:
* Sequel::ConstraintViolation (generic superclass)
* Sequel::CheckConstraintViolation
* Sequel::NotNullConstraintViolation
* Sequel::ForeignKeyConstraintViolation
* Sequel::UniqueConstraintViolation
* Sequel::Postgres::ExclusionConstraintViolation
* The :dataset association option can now take accept an optional
association reflection option. Instead of doing:
Album.one_to_many :artists,
:dataset=>{Artist...}
you can now do:
Album.one_to_many :artists,
:dataset=>{|r| r.associated_dataset...}
This second form will preform better.
* Temporary views are now supported on PostgreSQL and SQLite using
the :temp option to create_view.
= Other Improvements
* Row fetching speed in the tinytds adapter has been increased by
up to 60%.
* Row fetching speed in the mysql2 adapter when using an identifier
output method has been increased by up to 50%.
* On databases where offsets are emulated via the ROW_NUMBER window
function (Oracle, DB2, Microsoft SQL Server), using an offset in
a subselect is now supported. For example, the following code
previously didn't work correctly with emulated offsets:
# Second 5 rows ordered by column2 of the second 10 rows ordered
# by column 1.
DB[:table].order(:column1).limit(10, 10).
from_self.order(:column2).limit(5, 5)
Row processing speed has been increased slightly for all adapters
that supported databases where offsets are emulated.
* Association method performance has improved by caching an
intermediate dataset. This can close to triple the performance
of the association_dataset method, and increase the performance
of the association method by close to 30%.
* Virtual Row performance has increased about 30% in the typical
case by using a shared VirtualRow instance.
* Database#create_or_replace_view is now emulated on databases that
don't support it directly by dropping the view before attempting
to create it.
* The columns_introspection extension can now introspect for simple
select * queries from subselects, and it can now use the cached
schema information in the database for simple select * queries
from tables.
* The identity_map plugin now works correctly with many-to-many
right-side composite keys.
* Dataset#last for Model datasets now works even if you don't specify
an order explicitly, giving the last entry by primary key. Note
that Dataset#first for model datasets still does not order by
default.
* The eager_each plugin no longer uses Object#extend at runtime.
* Database#remove_cached_schema is now thread-safe on non-GVL ruby
implementations.
* Connection errors in the jdbc adapter now provide slightly more
helpful messages.
* Sequel now uses the standard offset emulation code in the
jdbc/as400 adapter, instead of custom offset emulation code
specific to that adapter.
* Database#create_view with a dataset now works correctly when using
the pg_auto_parameterize extension.
* Database#columns no longer calls the row_proc.
* Dataset#schema_and_table no longer turns a literal string into a
non-literal string.
* The oracle adapter now works with a :prefetch_rows=>nil option,
which explicitly disables prefetching.
* The mock mssql adapter now sets a server_version so that more
parts of it work.
= Backwards Compatibility
* Offset emulation via ROW_NUMBER works by moving the query to a
subselect that also selects from the ROW_NUMBER window function,
and filtering on the ROW_NUMBER in the main query. Previously, the
ROW_NUMBER was also present in the output columns, and some
adapter code was needed to hide that fact. Now, the outer select
selects all of the inner columns in the subselect except for the
ROW_NUMBER, reducing the adapter code needed. This has the side
effect of potentially requiring a query (or multiple queries for
multiple subselects) to determine the columns to use. The
columns_introspection extension may reduce the number of queries
needed.
* The correlated_subquery eager limit strategy is no longer supported
on Microsoft SQL Server for many_*_many associations. As the
window_function eager limit strategy is supported there, there is
no reason to use the correlated_subquery strategy.
* The public AssociationReflection#_dataset_method method has been
removed.
* The private _*_dataset methods for associations (e.g.
_albums_dataset) have been removed.
* The private Dataset#offset_returns_row_number_column? method has
been removed.
* :conditions options for associations are now added to the
association dataset before the foreign key filters, instead of
after. This should have no effect unless you were introspecting
the dataset's opts or sql and acting on it.
* The added abilities in the columns_introspection plugin to use
cached schema for introspection can now cause it to return
incorrect results if the table's schema has changed since it was
cached by Sequel.
Thanks,
Jeremy
* {Website}[http://sequel.rubyforge.org]
* {Source code}[http://github.com/jeremyevans/sequel]
* {Blog}[http://sequel.heroku.com]
* {Bug tracking}[http://github.com/jeremyevans/sequel/issues]
* {Google group}[http://groups.google.com/group/sequel-talk]
* {RDoc}[http://sequel.rubyforge.org/rdoc]
--
Posted via http://www.ruby-forum.com/.