[#347493] Making an RDoc Template Gem — Intransition <transfire@...>
I want to create a new RDoc template and I want to ship it as a gem.
[#347499] FasterCSV - varying headers — Sean Mcknew <smcknew@...>
Hello,
[#347506] how do you do this — George George <george.githinji@...>
Given an array of strings e.g.
On Thu, Oct 1, 2009 at 2:23 PM, George George <george.githinji@gmail.com> w=
George George wrote:
On Thu, Oct 1, 2009 at 2:21 PM, Ryan Davis <ryand-ruby@zenspider.com> wrote:
[#347515] Problems with SNMP — Rocir Santiago <rocirleite@...>
Hello!
Rocir, you should first check if your switch supports this functionality. I=
Hi, Nicol叩s.
2009/10/1 Rocir Santiago <rocirleite@gmail.com>
When I just add the ifPhysAddress, the application just exists, with out
[#347540] Newbie: Does Ruby have event driven network libraries? — Wyatt Biker <wyattbiker@...>
I made a turn based game and would like to make a back end engine
[#347564] Suggest a game development tool? — Tim Mcd <tmcdowell@...>
I'd like to make a 2D RPG in the style of FF5 and it's ilk. What tool do
[#347579] socket error handling... Net http — Bigmac Turdsplash <i8igmac@...>
loop {
[#347611] Rolling String Buffer needed — Matt Brooks <mattbrooks@...>
I have constant ascii data streaming in, each message terminated with
[#347612] Having a gem for 1.8 and 1.9 — "(RK) Sentinel" <sentinel.2001@...>
This is a simple query ... I am back after a long hiatus so have
[#347639] Ncurses run time error with ruby 1.9.1 — "(RK) Sentinel" <sentinel.2001@...>
I've just installed ruby 1.9.1 (port install). I gem installed ncurses,
[#347643] Writing a Mad Libs program? — Britt Hayes <brittghayes@...>
On Oct 3, 2009, at 9:39 AM, Britt Hayes wrote:
[#347650] On Ranges as conditions — Rafael Cunha de Almeida <none@...>
Reading a few tutorials I found this piece of code:
[#347664] ruby 1.9: handling meta and control keys — "(rkumar) Sentinel" <sentinel.2001@...>
1.8 used to return an int for say ?\M-a or ?C-a (when user types meta-a
[#347682] How to use transactions in DataMapper? — Bjoern <bjoerngt@...>
Hello,
[#347686] what do you enjoy in a ruby quiz? — Martin DeMello <martindemello@...>
I've noticed that the ruby quiz has been getting few responses of
Here is an artificial intelligence problem waiting for an algorithm. Would
[#347700] Count the number of times an element occurs in an array — Jim Burgess <jack.zelig@...>
Hi,
Hi --
[#347715] regex simplifier? — Roger Pack <rogerpack2005@...>
Question.
2009/10/5 Roger Pack <rogerpack2005@gmail.com>:
> I tried to cook something up in the past. You can find it when
> %r{(?<re>#{float})#{whitespace}(?<op>[+-])#{whitespace}(?<im>#{float})i}
[#347717] method_missing for command shell? — Roger Pack <rogerpack2005@...>
Hi all. My bash-fu is a little bit lacking, so here's my question.
Try zsh
[#347749] Vendored Oniguruma gem MissingSourceFile oregexp — Matthew Forrest <matthattan@...>
Hi All,
[#347753] BigDecimal to float error — Sam Kong <sam.s.kong@...>
Hi,
[#347765] Ruby for the wrong reason — flebber <flebber.crue@...>
Hi
flebber wrote:
Sounds like what I had trouble with (regarding Python) hated the indentatio=
flebber wrote:
On Oct 6, 2009, at 1:16 AM, 7stud -- wrote:
James Edward Gray II wrote:
On Oct 6, 2009, at 1:33 PM, 7stud -- wrote:
James Edward Gray II wrote:
On Oct 6, 2009, at 1:59 PM, 7stud -- wrote:
2009/10/6 James Edward Gray II <james@graysoftinc.com>:
[#347766] Rainbows! 0.1.1 - with Ruby 1.8 support! — Eric Wong <normalperson@...>
Rainbows! Unicorn for slow apps and slow clients
[#347777] Creating lots of folders on ftp server — Raimon Fs <coder@...>
Hello,
[#347785] new line in string — Sharanya Suresh <sharankruthi@...>
Hi,
[#347812] How to do explicit copy — rickyr <rickyrm978@...>
Hi,
[#347816] call Ruby file from HTML — Yousef Jawwad <javaonly@...>
hi everybody
[#347829] Creating a pacifier in command line program — Jerry Mr <jerry.piazza@...>
I am trying to create a program that, at one part, replaces already
[#347830] How to not display output of a system call. — Jerry Mr <jerry.piazza@...>
Lets say I have a Windows command line program that runs the following:
Jerry Mr wrote:
[#347862] Does Ruby have a 'which' like method — Scott G Smith <scottxsmith89@...>
Most UNIX shells have a which command.
[#347871] Google Wave- I need contacts! — Tim Mcd <tmcdowell@...>
After 6 days, i finally got my gWave invite! ('and there was much
Well, you could share the love (I'd love an invite) and build contacts
Andrew Timberlake wrote:
Tim, when they restrict the rules you could ping this group for an
Rajinder Yadav wrote:
i'd like an invite if you have a spare
Jarod Reid wrote:
Uhh, didn't hear of google wave before.
> Uhh, didn't hear of google wave before.
lith wrote:
Aldric Giacomoni wrote:
Aldric Giacomoni wrote:
On Wednesday 11 November 2009 08:53:37 am Anthony Metcalf wrote:
Add me ! ( eregontp@gmail.com )
I'm in.
[#347881] Why I can not use my own blocks in 1.9? — Ivan Samonov <hronya@...>
Example:
[#347886] unicorn 0.93.2 - more compatible with Rails — Eric Wong <normalperson@...>
Unicorn is a HTTP server for Rack applications designed to take
[#347887] lunix split with ruby — Ahmet Kilic <ahmedkilic@...>
I am using cygwin on windows.
On Wed, Oct 7, 2009 at 6:19 AM, Ahmet Kilic <ahmedkilic@gmail.com> wrote:
unknown wrote:
On Wed, Oct 7, 2009 at 11:25 AM, Ahmet Kilic <ahmedkilic@gmail.com> wrote:
[#347893] Ruby web programming — Yousef Jawwad <javaonly@...>
I am asking for , how I can call Ruby from html
[#347896] Ruby Marshal unexpected results — Aaron Vegh <aaron@...>
Hi there,
[#347900] Wx::Choice Items generated from lookup table, later need id's of choices. — Anthony Metcalf <anthony.metcalf@...>
Hi,
[#347931] Detect any "<a href=mailto:...>...</a>" string in a string? — Joshua Muheim <forum@...>
Hi all
[#347934] split question — Li Chen <chen_li3@...>
Hi all,
[#347970] Poll on Eval in Ruby. — Kazimir Majorinc <email@...>
I am Lisp programmer and I write an article on
[#347981] Mixing instance_eval and block with arguments — Robert Klemme <shortcutter@...>
Hi,
[#347986] Difficulty updating Ruby Gems in a non-standard location — David Brodbeck <brodbd@...>
I have Ruby Gems installed in a non-standard location. Both
On Oct 8, 2009, at 10:53 AM, David Brodbeck wrote:
[#347991] write a file — Li Chen <chen_li3@...>
Hi all,
[#347992] find a print out a line — Collin Moore <collin.moore@...>
Hi
[#348006] Green Threads - I want them to thrash... — Matt Brooks <mattbrooks@...>
All Day I have tried to accomplish the following using threads, and just
[#348009] String of Parameters used as parameter list — James Somers <jemburula@...>
Hi there,
[#348025] Making one reg ex out of two — Jim Burgess <jack.zelig@...>
I have a string:
[#348028] better looking directory chooser for tk? — Roger Pack <rogerpack2005@...>
Currently in windows with Tk
[#348041] File.addmod? — Roger Pack <rogerpack2005@...>
I'm familiar with
[#348042] Windows Ruby Version Check — James Edward Gray II <james@...>
Can a Windows Ruby user please confirm that the "Ruby 1.9.1-p129
On Oct 9, 2009, at 1:01 PM, James Edward Gray II wrote:
[#348061] Scope of constants in instance_eval — Peter Pk <peterk@...>
[#348064] Ruby Challenge for Beginners #2 — Satish Talim <satish.talim@...>
The second installment of the Ruby Programming Challenge for Newbies
[#348066] Numbers game - multiple guesses? — John Kriple <thefiend@...>
I'm trying to figure out how to get a user to be able to submit guesses
[#348091] Can't use variable from cgi with hpricot — Wiley Davis <wileydavis@...>
I'm trying to get a url from a form and return the page title of said
[#348092] Trouble with local variables — Severin Newsom <severin.newsom@...>
Hello everyone!
[#348100] Class Level inheritable attributes - are we there yet? — dreamcat four <dreamcat4@...>
Hi,
Hi --
The problem with class variables in Ruby, is that a class variable is
On 10/10/2009 08:59 PM, dreamcat four wrote:
On Sun, Oct 11, 2009 at 6:55 PM, Robert Klemme
On Tue, 13 Oct 2009, ara.t.howard wrote:
On Mon, Oct 12, 2009 at 17:48, David A. Black <dblack@rubypal.com> wrote:
2009/10/13 ara.t.howard <ara.t.howard@gmail.com>:
Hi,
[#348125] When use self.method_name and when only method_name? — Joshua Muheim <forum@...>
Hi all
[#348131] Tip du jour: no need to chomp before to_i — "David A. Black" <dblack@...>
Hi --
[#348138] newbie problem with Ruby — Alex Gd <quixoptic@...>
Hi there,
On Sun, Oct 11, 2009 at 11:03 PM, Alex Gd <quixoptic@gmail.com> wrote:
[#348146] ruby beginner — John Embree <johnembree2000@...>
hi guys reading here seems like everyone is a whole lot smarter at this
[#348163] Spliting hash using map! — Ne Scripter <stuart.clarke@...>
Hello,
[#348169] Does ruby.h overrides C "enum"? — Iñaki Baz Castillo <ibc@...>
Hi, writting a Ruby C extension (for 1.8 or 1.9) I get an error when using=
Iñaki Baz Castillo wrote:
El Lunes, 12 de Octubre de 2009, I=C3=B1aki Baz Castillo escribi=C3=B3:
Hi,
[#348187] Subclassing in module from top module? — Vít Ondruch <v.ondruch@...>
Hello everybody,
[#348188] Any "easy" example of using T_HASH in a C extension? — Iñaki Baz Castillo <ibc@...>
Hi, I've found some tutorials explaining how to create and manipulat a Ruby=
[#348210] remove specific text from line — Collin Moore <collin.moore@...>
Hi
[#348218] Ruby trunk — Jonas Schneider <js.sokrates@...>
Hey guys,
[#348221] manually sort array of numbers — Jason Lillywhite <jason.lillywhite@...>
for the sake of learning, I built a sort method to sort an array of
[#348222] Need Help with this problem — Ghost Alpha <ghosttilt@...>
I am in this programming class and need help on this problem:
[#348229] Enumerating and mixin. — Rajinder Yadav <devguy.ca@...>
I am trying to learn the correct way to enumerate in Ruby, a few things are
Rajinder Yadav wrote:
[#348237] How to call an foreign program(compiled) from ruby? — Harry <blogdriver@...>
Hi, I am trying to use some bin(like exe files under windows) file
[#348260] Rice installation issue. — George Thomas <george.thomas@...>
I have rice gem (rice-1.1.0.gem) downloaded to my folder C:\Ruby19
[#348281] how to solve a special JRuby and Java syntax conflict? — "Axel Etzold" <AEtzold@...>
Dear all,
On Tue, Oct 13, 2009 at 8:52 PM, Axel Etzold <AEtzold@gmx.de> wrote:
On Tue, Oct 13, 2009 at 9:52 PM, Paul Smith <paul@pollyandpaul.co.uk> wrote:
Dear Paul,
Axel Etzold wrote:
[#348291] no Enumerator#[] ? — Roger Pack <rogerpack2005@...>
Currently
[#348293] Ruby Ripper less Ruby 1.9 — Intransition <transfire@...>
Can't seem to find much on this. The last post I could find dated back
[#348309] Something portable for development purposes — Aldric Giacomoni <aldric@...>
Alright.. I'm going to buy something to develop with, and use as a
On 14 Oct 2009, at 05:00, Aldric Giacomoni wrote:
Eleanor McHugh wrote:
On 19 Oct 2009, at 18:35, Aldric Giacomoni wrote:
[#348316] How to resume execution of a FOR loop after timeout error — Stephen Lead <stephen.lead@...>
Hi everyone,
[#348317] deep cloning, how? — Rajinder Yadav <devguy.ca@...>
I am trying to figure out how to perform a deep clone
2009/10/14 Rajinder Yadav <devguy.ca@gmail.com>:
On 10/14/09, Robert Klemme <shortcutter@googlemail.com> wrote:
On 14.10.2009 19:03, Caleb Clausen wrote:
On 10/14/09, Robert Klemme <shortcutter@googlemail.com> wrote:
Caleb Clausen wrote:0
> But I think the spirit of dup
2009/10/16 lith <minilith@gmail.com>:
Robert Klemme wrote:
On 10/19/2009 10:32 AM, Brian Candler wrote:
[#348334] converting object into array — Suresh Napster <surinapster@...>
hi guys,
At 2009-10-14 07:52AM, "Paul Smith" wrote:
[#348339] Hey you! Stop using relative requires! — Intransition <transfire@...>
I recently came across two different programs that had this line in a
On Wed, Oct 14, 2009 at 6:01 AM, Intransition <transfire@gmail.com> wrote:
On Oct 18, 2009, at 4:36 PM, Intransition wrote:
James Edward Gray II wrote:
On Oct 19, 2009, at 4:30 PM, Thomas Sawyer wrote:
Intransition wrote:
[#348342] NANWSI: Not Another .NET Web Service Issue — Massimo Bensi <mbensi@...>
Hi all,
I guess nobody has the answer to this, hence nobody was able to make
On Fri, Oct 16, 2009 at 5:55 AM, Massimo Bensi <mbensi@spotzer.com> wrote:
[#348350] Ruby sql question — Manish Sharma <manish16s@...>
Hi,
[#348362] Problems With Fibers in Threads — Chris Wailes <chris.wailes@...>
I know it's an odd combination, but I have a situation where a thread
Are you trying to reschedule a fiber from a different thread? Afaik that
Tony Arcieri wrote:
OK, that does appear to be the problem as the Fibers are created in
On Wed, Oct 14, 2009 at 12:13 PM, Chris Wailes <chris.wailes@gmail.com> wro=
[#348397] dynamically access class constants? — Marli Ba <marli03@...>
I've been looking for a method similar to:
[#348401] matching against a zillion patterns — George George <george.githinji@...>
i have some script in which i would like to match a string against
George George wrote:
2009/10/15 steve <zyzygy@telstra.com>:
2009/10/15 George George <george.githinji@gmail.com>:
[#348419] parseexcel, how to select a worksheet using the name — Mario Ruiz <tcblues@...>
Hi,
On Thu, Oct 15, 2009 at 07:53, Mario Ruiz <tcblues@gmail.com> wrote:
That was the first thing I tried...
Any help???
[#348436] zena 0.15.0 gem release — Gaspard Bucher <gaspard@...>
First public release for zena, the CMS with super natural powers !
[#348486] Dynamic nested each in ruby 1.8.7? — Toi Toi <toi@...>
How can one have a function that uses a dynamic amount of each
Wow,
Florian Gilcher wrote:
On Sun, Oct 18, 2009 at 11:43 AM, Toi Toi <toi@mailinator.com> wrote:
That function does not give the correct output for larger arrays. The
[#348489] Need help comparing Array data — Matt Beckley <greenlizards@...>
Trying to write code for rock paper scissors game and read in two values
[#348521] Next steps in Ruby? — Aldric Giacomoni <aldric@...>
Hi everyone,
[#348525] ruby 1.8.6, threadpooling and blocking sockets - advice/help — Daniel Bush <dlb.id.au@...>
Hi,
On 10/19/2009 02:51 PM, Daniel Bush wrote:
Robert Klemme wrote:
On 20.10.2009 02:31, Daniel Bush wrote:
[#348529] Ruby & Watir -> test C# desktop app — Denis Gorban <dgorban@...>
Hi,
[#348545] Certificate hashes using Base64, DER, ASN.1, PkiPath... — Daniel Danopia <danopia@...>
I'm trying to write a server for a communications system
I know how to hash, I said it's the hard part because I don't know how
[#348551] Threads terminating — pawel <pjastrz@...>
Why this simple program give no output, and terminates immidiatly
[#348557] Install Error: No space left on device - write (Errno::ENOSP — Kurtis Rainbolt-greene <thinkwritemute@...>
Trying to install Ruby on my Ubuntu parition. I untared, ./configure'd,
On Mon, Oct 19, 2009 at 3:55 PM, Kurtis Rainbolt-greene
Hassan Schroeder wrote:
[#348570] memory leak — Rob Doug <broken.m@...>
Hi all,
On 20.10.2009 03:10, Rob Doug wrote:
On 21.10.2009 00:47, Rob Doug wrote:
> You could print out object statistics to get an idea about the source of
On 10/22/2009 04:52 AM, Rob Doug wrote:
[#348580] can 35.times do |i| be decrement of "i" ? — Jian Lin <blueskybreeze@...>
if there is a loop
Jian Lin wrote:
Rajinder Yadav wrote:
[#348600] recursive function problem — Maurizio De santis <desantis.maurizio@...>
Hi all!
[#348605] instance_eval with method proc — Paul Carey <paul.p.carey@...>
Hi
[#348611] Mutex confusion — Alex Young <alex@...>
I'm a little confused by Mutex's behaviour. It doesn't seem right that a
[#348615] Randomly generated words from a set of letters — MR-Mencel@...
Hi,
[#348618] Complex GSUB query — Ne Scripter <stuart.clarke@...>
Hello all,
[#348629] Please Review My First Ruby Program — Simeon Willbanks <simeon@...>
I've written a simple program to simulate a Soccer game. Its the first
[#348643] `make check' hangs, when the source directory is read-only — "Міхаіл Т." <mi+ruby-forum@...>
Hello!
[#348693] no route matches ' — Mc Ieong <mcieong@...>
HI, I AM A NEWBIE IN RUBY, I WANT TO USE THE JAVASCRIPT, SO I ADD THIS
[#348707] merging partial, incomplete data files — Benjamin Thomas <benjamin.thomas81@...>
Hello all,
[#348727] Creating and raising custom exception in Ruby C extension — Iñaki Baz Castillo <ibc@...>
Hi, I'm trying to create a CustomError exception in a Ruby C extension and =
El Jueves, 22 de Octubre de 2009, I=C3=B1aki Baz Castillo escribi=C3=B3:
On Thu, Oct 22, 2009 at 3:55 PM, I=C3=B1aki Baz Castillo <ibc@aliax.net> wr=
[#348735] ruby-1.9, sqlite3 and qt4 on windows — Martin DeMello <martindemello@...>
I'm thinking of developing an app with ruby 1.9, sqlite3 and qt4 which
Martin DeMello wrote:
Yes, i'm definitely using an orm :) Debating the relative merits of
[#348738] convert/replace a value of nil with 0? — Mmcolli00 Mom <mmc_collins@...>
Do you know how I can convert or replace any value that gets back a
On Thu, Oct 22, 2009 at 5:24 PM, Mmcolli00 Mom <mmc_collins@yahoo.com> wrote:
2009/10/22 Jes=FAs Gabriel y Gal=E1n <jgabrielygalan@gmail.com>:
[#348747] Using SHA1 Digested Passwords for SSH connection — Joe Martin <joseph.w.martin.ctr@...>
Hello all.
[#348757] Good term for "super-project" — Intransition <transfire@...>
Rather a minor thing, but it's been on my TODO list for too long.
[#348774] Tiamat: Automatic parallelism across multiple machines — "James M. Lawrence" <quixoticsycophant@...>
= Tiamat
On Thu, Oct 22, 2009 at 11:42 PM, James M. Lawrence
[#348781] Setting attribute via send in Ruby 1.8.6 — Charles Calvert <cbciv@...>
Using Ruby 1.8.6.
On Fri, 23 Oct 2009 17:18:22 +0200, Robert Klemme
[#348799] C extension: "malloc" and "rb_raise" — Iñaki Baz Castillo <ibc@...>
Hi, if I use "malloc" in a Ruby C function and then call to "rb_raise" (so =
Hi,
El S=E1bado, 24 de Octubre de 2009, Yukihiro Matsumoto escribi=F3:
Hi,
[#348807] can you implement a better IO#each_lines? — Haoqi Haoqi <axgle@126.com>
like this,thanks
[#348819] Enumerable ObjectSpace (#222) — Daniel Moore <yahivin@...>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
On Saturday 24 October 2009, Daniel Moore wrote:
[#348820] VM help — Alexander Cohen <naftaly@...>
Hello,
[#348825] mail — Mikel Lindsaar <raasdnil@...>
Some of you might know about a little gem that Minero Aoki wrote called tmail.
On Oct 24, 2009, at 9:38 PM, Mikel Lindsaar wrote:
[#348826] using .delete_if and reject on elements in an array — Matt Beckley <greenlizards@...>
Working on code to fill an array with 200 random integer elements. The
[#348831] erb:how to make less % ? — Haoqi Haoqi <axgle@126.com>
demo.html.erb
[#348846] BareTest 0.2 released — apeiros@...
I'm pleased to announce BareTest 0.2.
Stefan Rusterholz wrote:
[#348859] Using id2ref for anything? — Charles Oliver Nutter <headius@...>
ObjectSpace._id2ref is another of those peculiar methods, an artifact
[#348867] file open failure test — Derek Smith <derekbellnersmith@...>
Hi All,
On Monday 26 October 2009, Derek Smith wrote:
2009/10/26 Stefano Crocco <stefano.crocco@alice.it>:
Hi,
Bertram Scharpf wrote:
[#348877] Array#collect in a method call, not working for me — Michael Randall <randallsata@...>
I am sure I'm making a newbie mistake, as I've just started learning
2009/10/26 Michael Randall <randallsata@gmail.com>:
OK, I *thought* that part was working, but now I see that it wasn't
[#348884] Try to copy text between two know string — Ahmad Azizan <ahmad.azizan@...>
Hello,
On Mon, Oct 26, 2009 at 8:33 AM, Ahmad Azizan <ahmad.azizan@gmail.com> wrot=
[#348891] Array Number of Leaves — salai <sayakyi@...>
Dear Rubyist,
[#348899] Hash Reverse ? — salai <sayakyi@...>
I am preparing for my orals exam in Ruby (my last chance.. , If I fail
[#348911] Setting instance variables from hash parameters (with defaults) — Leslie Viljoen <leslieviljoen@...>
Hi!
I see this is a shorter way:
[#348939] RCR: regex + regex — Roger Pack <rogerpack2005@...>
Feedback on the following suggestion for ruby:
[#348940] frubygems -- quicker loading rubygems:"spooky" version — Roger Pack <rogerpack2005@...>
Please to announce release code-named "spooky" of fast rubygems.
[#348944] RSpec swallowing huge chunks of my backtraces — Tony Arcieri <tony@...>
I don't know exactly when this started happening, but it seems like RSpec
On Mon, Oct 26, 2009 at 7:37 PM, Tony Arcieri <tony@medioh.com> wrote:
[#348946] array question — Ruby Mokx <rubymokx@...>
Hey everyone I'm a 14 year-old beginner in ruby and I discovered that I
[#348968] SQL Shell for MS Access — Paul Smith <paul@...>
What I want is an SQL command prompt allowing me to run SQL queries
Paul Smith wrote:
2009/10/27 Paul Smith <paul@pollyandpaul.co.uk>:
[#348977] watir or selenium — Erika <geagneske83@...>
Hi,
[#348994] miniruby — Richard Lee <wing2@...>
Is miniruby needed to install ruby for Unix? If so, where can I find
[#348999] Net LDAP problem (no attrs or get_attributes methods) — Glen Holcomb <damnbigman@...>
So I am having difficulty getting the attributes for an LDAP entry. If I
ldap.search(base, scope, filter, attrs) { |entry|
Nope, same error. I passed "*" to the attrs argument.
Glen Holcomb wrote:
[#349004] duby 0.0.1 Released — Charles Oliver Nutter <headius@...>
duby version 0.0.1 has been released!
On Tue, Oct 27, 2009 at 5:13 PM, Bill Kelly <billk@cts.com> wrote:
[#349022] Closures / lambda question — Aldric Giacomoni <aldric@...>
This is something I don't understand, and did not understand when I
Aldric Giacomoni wrote:
Marnen Laibow-Koser wrote:
Aldric Giacomoni wrote:
Marnen Laibow-Koser wrote:
[#349023] Hey I need help with my code. — Brian Geds <uforacer@...>
Hello guys I am doing a little something for class but I need help
You need a break in your loop. Also the conditional syntax is wrong
[#349024] Desktop GUI apps in Ruby — Marnen Laibow-Koser <marnen@...>
Hi folks!
Marnen Laibow-Koser wrote:
On Wed, Oct 28, 2009 at 9:03 AM, Marnen Laibow-Koser <marnen@marnen.org> wr=
Marnen Laibow-Koser wrote:
[#349045] Is it possible to do multiple regex in one operation? — Ahmad Azizan <ahmad.azizan@...>
Hello,
[#349050] Help With Homework Code — Rick Barrett <chngth3wrld@...>
Another user posted a question about a dice game earlier. I have this
Rick Barrett wrote:
Thank you Candlerb.
In this bit
Max Williams wrote:
I'm not sure I understand what you're saying. I tried the "if"
[#349058] Test your ruby skill — Raveendran Perumalsamy <jazzezravi@...>
Hi,
On Wed, Oct 28, 2009 at 6:23 AM, Raveendran Perumalsamy
Hi Rajinder,
Raveendran Perumalsamy wrote:
Hi Rajinder,
[#349070] Regexp: rubular VS match. Why is the result different ? — Ale Ds <alexdesi@...>
I have to capture by means of regexp the content between '<' and '>'
[#349099] Ruby can't subtract ? — Aldric Giacomoni <aldric@...>
I found this blog entry:
On Thu, 29 Oct 2009, Aldric Giacomoni wrote:
Matthew K. Williams wrote:
On Thu, 29 Oct 2009, Aldric Giacomoni wrote:
On 28.10.2009 19:21, Matthew K. Williams wrote:
Robert Klemme wrote:
Aldric Giacomoni wrote:
[#349113] Uninitialized Constant — Josh Stevenson <jstevenson@...>
I am sure that there is going to be info I leave out that you will need,
Josh Stevenson wrote:
> Looks like you're in a Rails application. Where does convert.rb live?
Josh Stevenson wrote:
> OK, so these scripts are not part of the Rails app, and the rails
[#349124] String Matching Problem — Matt Brooks <mattbrooks@...>
I need a way to accomplish the following. I can't figure out an elegant
Matt Brooks wrote:
I appreciate everyone's input, It seems like they should all work, and
2009/10/29 Matt Brooks <mattbrooks@gatech.edu>:
[#349140] Ruby in Australia... — Hal Fulton <rubyhacker@...>
Hi, all...
[#349141] Having issues with exception — Kyle Johnson <kylearippee@...>
Hi, I have been having a bit of an issue. I am trying to create a
Your problem is that you're catching the exception outside of the loop. Try
Judson Lester wrote:
Marnen Laibow-Koser wrote:
[#349159] What us binding objects — Nike Mike <thillaibooks@...>
What is the usage of binding objects
[#349183] Using multicore CPUs in parallel tasks — Marc Hoeppner <marc.hoeppner@...>
Hi,
On Thu, Oct 29, 2009 at 8:56 AM, Marc Hoeppner
On Thu, Oct 29, 2009 at 11:48 AM, Glen Holcomb <damnbigman@gmail.com> wrote:
On 10/29/2009 09:04 PM, Tony Arcieri wrote:
Tony Arcieri wrote:
[#349199] Problem with compiling Ruby-1.9.1-p243 — Richard Lee <wing2@...>
Hi...I am having problem to compile Ruby-1.9.1-p243 on AIX 5.3. Can
[#349207] Why (1..4).inject(&:+) works ? — Benoit Daloze <eregontp@...>
Hi rubyists,
Hi,
[#349216] #system() hangs, child is defunct — Tor Erik Linnerud <tel@...>
Hi all,
[#349230] I can not load rubygems onto ruby using linux — Melvin Clarkson <mpclarkson@...>
Hi,
[#349253] Ruby doesn't implement x++ for Fixnum's because ??? — RichardOnRails <RichardDummyMailbox58407@...>
Hi,
On Oct 29, 9:18=A0pm, RichardOnRails
2009/10/30 RichardOnRails <RichardDummyMailbox58407@uscomputergurus.com>:
> IMHO the story goes like this: absence of postfix ++ and -- is a
On Fri, Oct 30, 2009 at 11:05 AM, Robert Klemme
On Fri, Oct 30, 2009 at 12:03 PM, Rick DeNatale <rick.denatale@gmail.com>wrote:
Tony Arcieri wrote:
On Tue, Nov 3, 2009 at 10:30 PM, Michael W. Ryder <_mwryder55@gmail.com>wrote:
Of course I had to jump in here.
On Wed, Nov 4, 2009 at 1:58 AM, Charles Oliver Nutter
Rick Denatale wrote:
Hi,
On Nov 4, 10:59=A0am, Yukihiro Matsumoto <m...@ruby-lang.org> wrote:
On Nov 5, 4:11=A0am, Tony Arcieri <t...@medioh.com> wrote:
On Nov 4, 5:58=A0pm, Charles Oliver Nutter <head...@headius.com> wrote:
On Wed, Nov 4, 2009 at 3:55 AM, Gavin Sinclair <gsinclair@gmail.com> wrote:
On Wed, Nov 4, 2009 at 10:41 PM, Tony Arcieri <tony@medioh.com> wrote:
On Wed, Nov 4, 2009 at 10:23 AM, Martin DeMello <martindemello@gmail.com>wrote:
> -----Original Message-----
Walton Hoops wrote:
Michael W. Ryder wrote:
On Wed, Nov 4, 2009 at 1:46 PM, Marnen Laibow-Koser <marnen@marnen.org>wrote:
Tony Arcieri wrote:
> -----Original Message-----
Walton Hoops wrote:
Michael W. Ryder wrote:
> -----Original Message-----
Walton Hoops wrote:
Michael W. Ryder wrote:
On 2009-11-06, David A. Black <dblack@rubypal.com> wrote:
On Fri, Nov 6, 2009 at 4:30 PM, Seebs <usenet-nospam@seebs.net> wrote:
On Sun, Nov 8, 2009 at 11:48 AM, Tony Arcieri <tony@medioh.com> wrote:
On Sun, Nov 8, 2009 at 10:45 AM, Rick DeNatale <rick.denatale@gmail.com>wrote:
Tony Arcieri wrote:
On Sun, Nov 8, 2009 at 11:22 AM, Marnen Laibow-Koser <marnen@marnen.org>wrote:
> -----Original Message-----
On Sun, Nov 8, 2009 at 11:49 AM, Walton Hoops <walton@vyper.hopto.org>wrote:
> From: bascule@gmail.com [mailto:bascule@gmail.com] On Behalf Of Tony
On Sun, Nov 8, 2009 at 1:15 PM, Walton Hoops <walton@vyper.hopto.org> wrote:
Gaah, close this thread! ;)
On Sun, Nov 8, 2009 at 2:30 PM, Florian A=DFmann <florian.assmann@email.de>=
Tony Arcieri wrote:
On Sun, Nov 8, 2009 at 3:49 PM, Marnen Laibow-Koser <marnen@marnen.org>wrote:
On 2009-11-08, Tony Arcieri <tony@medioh.com> wrote:
On Nov 8, 12:37=A0pm, Tony Arcieri <t...@medioh.com> wrote:
On Nov 9, 9:44=A0am, Tony Arcieri <t...@medioh.com> wrote:
On Sun, Nov 8, 2009 at 8:50 PM, Gavin Sinclair <gsinclair@gmail.com> wrote:
Tony Arcieri wrote:
On Sun, Nov 8, 2009 at 9:54 PM, Joel VanderWerf <vjoel@path.berkeley.edu>wrote:
Tony Arcieri wrote:
Marnen Laibow-Koser wrote:
On 2009-11-09, Marnen Laibow-Koser <marnen@marnen.org> wrote:
On Mon, Nov 9, 2009 at 8:40 AM, Seebs <usenet-nospam@seebs.net> wrote:
Rick Denatale wrote:
Marnen Laibow-Koser wrote:
Aldric Giacomoni wrote:
Marnen Laibow-Koser wrote:
On Mon, Nov 9, 2009 at 11:14 AM, Aldric Giacomoni <aldric@trevoke.net> wrot=
Rick Denatale wrote:
Just so you know I wasn't dissing La langue belle. I try to maintain
Tony Arcieri <tony@medioh.com> writes:
On 2009-11-09, Tony Arcieri <tony@medioh.com> wrote:
Seebs wrote:
On Nov 20, 2:48=A0am, Aldric Giacomoni <ald...@trevoke.net> wrote:
[#349256] Ruby style question (many-arg methods) — Nick Green <cruzmail.ngreen@...>
If you are calling a method that takes a lot of arguments and starts a
[#349264] How do you get the tail end of a string? — "Just Another Victim of the Ambient Morality" <ihatespam@...>
I'm actually hoping this is an embarrassing question but how do you get
Just Another Victim of the Ambient Morality wrote:
Michael W. Ryder wrote:
Hi,
Bertram Scharpf wrote:
Hi,
Bertram Scharpf wrote:
Hi,
[#349275] Interesting GC.start — Haoqi Haoqi <axgle@126.com>
irb:
[#349276] String#split and capturing delimiters — Albert Schlef <albertschlef@...>
Since what version of Ruby does "String#split /(whatever)/" returns the
[#349283] Ruby Challenge for Beginners #3 - Short Circuit — Satish Talim <satish.talim@...>
Ruby beginners: The third installment of the Ruby Programming Challenge for
On Fri, Oct 30, 2009 at 10:52 AM, Satish Talim <satish.talim@gmail.com> wrote:
[#349289] HTTPClient problem with SSL and ruby 1.8.7 — Philippe Philos <plucas@...>
[#349317] two stage array sorting — Tim Ferrell <s0nspark@...>
[#349323] Merging hashes using both symbols and strings as keys — shenry <stuarthenry@...>
I'm trying to merge to hashes, one using symbols as keys (the defined
On Fri, Oct 30, 2009 at 11:10 AM, shenry <stuarthenry@gmail.com> wrote:
2009/11/3 Josh Cheek <josh.cheek@gmail.com>:
On Tue, Nov 3, 2009 at 7:06 AM, Robert Klemme <shortcutter@googlemail.com>wrote:
On Tue, Nov 3, 2009 at 1:22 PM, Josh Cheek <josh.cheek@gmail.com> wrote:
On Tue, Nov 3, 2009 at 7:27 AM, Paul Smith <paul@pollyandpaul.co.uk> wrote:
On Tue, Nov 3, 2009 at 8:40 AM, Josh Cheek <josh.cheek@gmail.com> wrote:
[#349352] In-place parameter modification — Dave Anderson <anderson@...>
Native to ruby are several methods that change passed-in parameters
Actually, chomp!(string) doesn't modify string, it modifies $_ (which, if I
Judson Lester wrote:
On Sat, Oct 31, 2009 at 5:03 AM, 7stud -- <bbxx789_05ss@yahoo.com> wrote:
Hello,
On Oct 31, 2009, at 12:44 PM, Robert Gleeson wrote:
[#349354] mtime.max — Derek Smith <derekbellnersmith@...>
Hi All,
[#349367] Really small numbers in ruby coming as zero!? — Mahadev Ittina <mittina@...>
hello I have this piece of code written to analyse the cross section and
[#349369] compile architecture-specific, portable ruby — "Sean O'Donnell" <s3an.odonn3ll@...>
Hello,
[#349390] how can i perform a one line case statement on a number — Braxton Beyer <rubyforum@...>
I want to be able to do something like this:
Braxton Beyer wrote:
[#349406] Hamurabi (#223) — Daniel Moore <yahivin@...>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
On Oct 31, 2009, at 6:23 PM, Daniel Moore wrote:
On Mon, Nov 2, 2009 at 5:29 AM, James Edward Gray II
BASIC wasn't that bad...
"8k MICROSOFT BASIC", apparently :) It's the one here:
Wow this looks old, almost like GWBasic.
Sorry I'm new to the list. Is it ok to post solutions at this point
On Nov 2, 2009, at 6:37 PM, genericpenguin wrote:
On Mon, Nov 2, 2009 at 10:25 AM, Ehsanul Hoque <ehsanul_g3@hotmail.com> wro=
ANN: Sequel 3.5.0 Released
Sequel is a lightweight database access toolkit for Ruby.
* Sequel provides thread safety, connection pooling and a concise DSL
for constructing database queries and table schemas.
* Sequel also includes a lightweight but 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, master/slave
configurations, and database sharding.
* Sequel makes it easy to deal with multiple records without having
to break your teeth on SQL.
* Sequel currently has adapters for ADO, Amalgalite, DataObjects,
DB2, DBI, Firebird, Informix, JDBC, MySQL, ODBC, OpenBase, Oracle,
PostgreSQL and SQLite3.
Sequel 3.5.0 has been released and should be available on the gem
mirrors. The 3.5.0 release adds numerous improvements:
New Plugins
-----------
* A class_table_inheritance plugin has been added, supporting model
inheritance in the database using a table-per-model-class approach.
Each table stores only attributes unique to that model or subclass
hierarchy.
For example, with this hierarchy:
Employee
/ \
Staff Manager
|
Executive
the following database schema may be used (table - columns):
* employees - id, name, kind
* staff - id, manager_id
* managers - id, num_staff
* executives - id, num_managers
The class_table_inheritance plugin assumes that the main table
(e.g. employees) has a primary key field (usually
autoincrementing), and all other tables have a foreign key of the
same name that points to the same key in their superclass's table.
For example:
* employees.id - primary key, autoincrementing
* staff.id - foreign key referencing employees(id)
* managers.id - foreign key referencing employees(id)
* executives.id - foreign key referencing managers(id)
When using the class_table_inheritance plugin, subclasses use joined
datasets:
Employee.dataset.sql # SELECT * FROM employees
Manager.dataset.sql # SELECT * FROM employees
# INNER JOIN managers USING (id)
Executive.dataset.sql # SELECT * FROM employees
# INNER JOIN managers USING (id)
# INNER JOIN executives USING (id)
This allows Executive.all to return instances with all attributes
loaded. The plugin overrides deleting, inserting, and updating
in the model to work with multiple tables, by handling each table
individually.
This plugin allows and encourages the use of a :key option to mark
a column holding the class name. This allows methods on the
superclass to return instances of specific subclasses.
a = Employee.all # [<#Staff>, <#Manager>, <#Executive>]
This plugin requires the lazy_attributes plugin and uses it to
handle subclass specific attributes that would not be loaded
when calling superclass methods (since those wouldn't join
to the subclass tables). For example:
a.first.values # {:id=>1, name=>'S', :kind=>'Staff'}
a.first.manager_id # Loads the manager_id attribute from the
# database
The class_table_inheritance plugin requires JOIN USING and
therefore is not supported on H2 or Microsoft SQL Server, which do
not support that SQL-92 feature.
* An associations_dependencies plugin was added for deleting,
destroying, or nullifying associated objects when destroying a
model object. This just gives an easy way to add the necessary
before and after destroy hooks. The following association types
support the following dependency actions:
* :many_to_many - :nullify (removes all related entries in join
table)
* :many_to_one - :delete, :destroy
* :one_to_many - :delete, :destroy, :nullify (sets foreign key to
NULL for all associated objects)
This plugin works directly with the association datasets and does
not use any cached association values. The :delete action will
delete all associated objects from the database in a single SQL
call. The :destroy action will load each associated object from the
database and call the destroy method on it.
The plugin call takes a hash of association symbol keys and
dependency action symbol values. Alternatively, you can specify
additional dependencies later using add_association_dependencies:
Business.plugin :association_dependencies, :address=>:delete
# or:
Artist.plugin :association_dependencies
Artist.add_association_dependencies :albums=>:destroy,
:reviews=>:delete, :tags=>:nullify
* A force_encoding plugin was added that forces the encoding of
strings used in model instances. When model instances are loaded
from the database, all values in the hash that are strings are
forced to the given encoding. Whenever you update a model column
attribute, the resulting value is forced to a given encoding if the
value is a string. There are two ways to specify the encoding.
You can either do so in the plugin call itself, or via the
forced_encoding class accessor:
class Album < Sequel::Model
plugin :force_encoding, 'UTF-8'
# or
plugin :force_encoding
self.forced_encoding = 'UTF-8'
end
This plugin only works on ruby 1.9, since strings don't have
encodings in 1.8.
* A typecast_on_load plugin was added, for fixing bad database
typecasting when loading model objects. Most of Sequel's database
adapters don't have complete control over typecasting, and may
return columns that aren't typecast correctly (with correct being
defined as how the model object would typecast the same column
values).
This plugin modifies Model.load to call the setter methods (which
typecast by default) for all columns given. You can either specify
the columns to typecast on load in the plugin call itself, or
afterwards using add_typecast_on_load_columns:
Album.plugin :typecast_on_load, :release_date, :record_date
# or:
Album.plugin :typecast_on_load
Album.add_typecast_on_load_columns :release_date, :record_date
If the database returns release_date and record_date columns as
strings instead of dates, this will ensure that if you access those
columns through the model object, you'll get Date objects instead of
strings.
* A touch plugin was added, which adds Model#touch for updating an
instance's timestamp, as well as touching associations when an
instance is updated or destroyed.
The Model#touch instance method saves the object with a modified
timestamp. By default, it uses the :updated_at column, but you can
set which column to use. It also supports touching of associations,
so that when the current model object is updated or destroyed, the
associated rows in the database can have their modified timestamp
updated to the current timestamp. Example:
class Album < Sequel::Model
plugin :touch, :column=>:modified_on, :associations=>:artist
end
* A subclasses plugin was added, for recording all of a models
subclasses and descendent classes. Direct subclasses are available
via the subclasses method, and all descendent classes are available
via the descendents method:
c = Class.new(Sequel::Model)
c.plugin :subclasses
sc1 = Class.new(c)
sc2 = Class.new(c)
ssc1 = Class.new(sc1)
c.subclasses # [sc1, sc2]
sc1.subclasses # [ssc1]
sc2.subclasses # []
ssc1.subclasses # []
c.descendents # [sc1, ssc1, sc2]
The main use case for this is if you want to modify all models
after the model subclasses have been created. Since mutable
options are copied when subclassing, modifying parent classes
does not affect current subclasses, only future ones. The
subclasses plugin allows you get all subclasses so that you can
easily modify them. The plugin only records subclasses
created after the plugin call, though.
* An active_model plugin was added, giving Sequel::Model an
ActiveModel complaint API, in so much as it passes the
ActiveModel::Lint tests.
New Extensions
--------------
* A named_timezones extension was added, allowing you to use named
timezones such as "America/Los_Angeles" (the default Sequel
timezone support only supports UTC or local time). This extension
requires TZInfo. It also sets the Sequel.datetime_class to
DateTime, so database timestamps will be returned as DateTime
instances instead of Time instances. This is because ruby's
Time class doesn't support timezones other than UTC and local time.
This plugin allows you to pass either strings or TZInfo::Timezone
instance to Sequel.database_timezone=, application_timezone=, and
typecast_timezone=. If a string is passed, it is converted to a
TZInfo::Timezone using TZInfo::Timezone.get.
Let's say you have the database server in New York and the
application server in Los Angeles. For historical reasons, data
is stored in local New York time, but the application server only
services clients in Los Angeles, so you want to use New York
time in the database and Los Angeles time in the application. This
is easily done via:
Sequel.database_timezone = 'America/New_York'
Sequel.application_timezone = 'America/Los_Angeles'
Then, before timestamps are stored in the database, they are
converted to New York time. When timestamps are retrieved from the
database, they are converted to Los Angeles time.
* A thread_local_timezones extension was added. This allows you to
set a per-thread timezone that will override the default global
timezone while the thread is executing. The main use case is for
web applications that execute each request in its own thread, and
want to set the timezones based on the request. The most common
example is having the database always store time in UTC, but have
the application deal with the timezone of the current user. That
can be done with:
Sequel.database_timezone = :utc
# In each thread:
Sequel.thread_application_timezone = current_user.timezone
This extension is designed to work with the named_timezones
extension.
* An sql_expr extension was added that adds .sql_expr methods to
all objects, giving them easy access to Sequel's DSL:
1.sql_expr < :a # 1 < a
false.sql_expr & :a # FALSE AND a
true.sql_expr | :a # TRUE OR a
~nil.sql_expr # NOT NULL
"a".sql_expr + "b" # 'a' || 'b'
Proc#sql_expr uses a virtual row:
proc{[[a, b], [a, c]]}.sql_expr | :x
# (((a = b) AND (a = c)) OR x)
* A looser_typecasting extension was added, for using to_f and to_i
instead of the more strict Kernel.Float and Kernel.Integer when
typecasting floats and integers. To use it, you should extend the
database with the Sequel::LooserTypecasting module after loading
the extension:
Sequel.extension :looser_typecasting
DB.extend(Sequel::LooserTypecasting)
This makes the behavior more like ActiveRecord:
a = Artist.new(:num_albums=>'a')
a.num_albums # => 0
Other New Features
------------------
* Associations now support composite keys. All of the :*key options
options now accept arrays of symbols instead of plain symbols.
Example:
Artist.primary_key # [:name, :city]
Album.many_to_one :artist, :key=>[:artist_name, :artist_city]
Artist.one_to_many :albums, :key=>[:artist_name, :artist_city]
All association types are supported, including the built-in
many_to_many association and the many_through_many plugin. Both
methods of eager loading work with composite keys for all
association types. Setter and add/remove/remove_all methods
also now work with composite keys.
* Associations now respect a :validate option, which can be set to
false to not validate when implicitly saving associated objects.
There isn't a lot of implicit saving in Sequel's association
methods, but this gives the user the control over validation when
the association methods implicitly save an object.
* In addition to the regular association methods, the
nested_attributes plugin was also updated to respect the
:validate_association option. It was also modified to not validate
associated objects twice, once when the parent object was validated
and again when the associated object was saved. Additionally, if
you pass :validate=>false to the save method when saving the parent
object, it will not longer attempt to validate associated objects
when saving them.
* Dataset#insert and #insert_sql were refactored and now support the
following API:
* No arguments - Treat as a single empty hash argument
* Single argument:
* Hash - Use keys as columns and values as values
* Array - Use as values, without specifying columns
* Dataset - Use a subselect, without specifying columns
* LiteralString - Use as the values
* 2 arguments:
* Array, Array - Use first array as keys, second as values
* Array, Dataset - Use a subselect, with the array as columns
* Array, LiteralString - Use LiteralString as the values, with
the array as the columns
* Anything else: Treat all given values an an array of values
* Graphing now works with previously joined datasets. The main use
case of this is when eagerly loading (via eager_graph) model
associations for models backed by joined datasets, such as those
created by the class_table_inheritance plugin.
* Sequel.virtual_row was added allowing you to easily use the
VirtualRow support outside of select, order, and filter calls:
net_benefit = Sequel.virtual_row{revenue > cost}
good_employee = Sequel.virtual_row{num_commendations > 0}
fire = ~net_benefit & ~good_employee
demote = ~net_benefit & good_employee
promote = net_benefit & good_employee
DB[:employees].filter(fire).update(:employed=>false)
DB[:employees].filter(demote).update(:rank=>:rank-1)
DB[:employees].filter(promote).update(:rank=>:rank+1)
* When Sequel wraps exception in its own classes (to provide database
independence), it now keeps the wrapped exception available in
a wrapped_exception accessor. This allows you to more easily
determine the wrapped exception class, without resorting to parsing
the exception message.
begin
DB.run('...')
rescue Sequel::DatabaseError => e
case e.wrapped_exception
when Mysql::Error
...
when PGError
...
end
end
* The MySQL adapter now supports a Dataset#split_multiple_result_sets
method that yields arrays of rows (one per result set), instead of
rows. This allows you to submit multiple statements at the same
time (or call a stored procedure that returns multiple result
sets), and know which rows are related to which result sets.
This violates a lot of Sequel's internal assumptions and should be
used with care. Existing row_procs are modified to work correctly,
but graphing will not work on these datasets.
* The ADO adapter now accepts a :conn_string option and uses that
as the full ADO connection string. This can be used to connect to
any datasource ADO supports, such as Microsoft Excel.
* The Microsoft SQL Server shared adapter now supports a
Database#server_version method.
* The Microsoft SQL Server shared adapter now supports updating and
deleting from joined datasets.
* The Microsoft SQL Server shared adapter now supports a
Dataset#output method that uses the OUTPUT clause.
* Model#_save now calls either Model#_insert or Model#_update for
inserting/updating the row in the database. This allows for easier
overriding when you want to allow creating and updating model
objects backed by a joined dataset.
* Dataset#graph now takes a :from_self_alias option specifying the
alias to use for the subselect created if the receiver is a joined
but not yet graphed dataset. It defaults to the first source table
in the receiver.
Other Improvements
------------------
* Typecasting model attributes is now done before checking existing
values, instead of after. Before, the code for the model attribute
setters would compare the given value to the existing entry. If it
didn't match, the value was typecasted and then assigned. That led
to the following situation:
a = Album[1]
a.num_tracks # => 10
params # => {'num_tracks'=>'10'}
a.set(params)
a.changed_columns # => [:num_tracks]
The new behavior typecasts the value first, and only sets it and
records the column as changed if it doesn't match the typecasted
value.
* Model#modified? is now always true if the record is new. modified?
indicates the instance's status relative to the database, and since
a new object is not yet in the database, and saving the object
would add it, the object is considered modified. A consequence of
this is that Model#save_changes now always saves if the object is
new.
If you want to check if there were changes to columns since the
object was first initialized, you should use
!changed_columns.empty?, which was the historical way to handle
the situation.
* The DataObjects (do) adpater now supports DataObjects 0.10.
* Dataset#select_more and Dataset#order_more no longer affect the
receiver. They are supposed to just return a modified copy of the
receiver instead of modifying the receiver itself. For a few
versions they have been broken in that they modified the receiver
in addition to returning a modified copy.
* Performance was increased for execution of prepared statements
with multiple bound variables on MySQL.
* On MySQL, database errors raised when preparing statements or
setting bound variable values are now caught and raised as
Sequel::DatabaseErrors.
* On MySQL, more types of disconnection errors are detected.
* When altering columns in MySQL, options such as :unsigned,
:elements, and :size that are given in the call are now respected.
* MySQL enum defaults are now handled correctly in the schema dumper.
* The schema dumper no longer attempts to use unparseable defaults
as literals on MySQL, since MySQL does not provide defaults as
valid literals.
* The emulated offset support in the shared Microsoft SQL Server
adapter now works better with model classes (or any datasets with
row_procs).
* Microsoft SQL Server now supports using the WITH clause in delete,
update, and insert calls.
* Parsed indexes when connecting to Microsoft SQL Server via JDBC no
longer include primary key indexes.
* Dataset#insert_select now returns nil if disable_insert_returning
is used in the shared PostgreSQL adapter. This makes it work as
expected with model object creation.
* Calling Model.set_primary_key with an array of symbols to set
a composite primary key is now supported. You can also provide
multiple symbol arguments to do the same thing. Before, specifying
an array of symbols broke the Model.[] optimization.
* Literalization of timezones in timestamps now works correctly on
Oracle.
* __FILE__ and __LINE__ are now used everywhere that eval is called
with a string, which makes for better backtraces.
* The native MySQL adapter now correctly handles returning before
yielding all result sets. Previously, this caused a commands out
of sync error.
* Table names in common table expressions are now quoted.
* The Oracle adapter's Dataset#except now accepts a hash, giving it
the same API as the default Dataset#except.
* When connecting to Microsoft SQL Server via ADO, allow
Dataset#insert to take multiple arguments.
* Fractional timestamps are no longer used on ODBC.
* Schema parsing now works on MSSQL when the database is set to not
quote identifiers.
* Timezone offsets are no longer used on Microsoft SQL Server, since
they only work for the datetimeoffset type.
* Only 3 fractional digits in timestamps are used in Microsoft SQL
Server, since an error is raised if the use the datetime type
with more than that.
* The integration test suite now has guards for expected failures
when run on known databases. Expected failures are marked as
pending.
Backwards Compatibility
-----------------------
* Graphing to an previously joined (but not graphed) dataset now
causes the receiver to be wrapped in a subselect, so if you
graph a dataset to a previously joined dataset, and then filter
the dataset referring to tables that were in the joined dataset
(other than the first table), the SQL produced will probably no
longer be valid. You should either filter the dataset before
graphing or use the name of the first source of the joined
dataset (which is what the subselected is aliased to) if filtering
afterward.
In certain cases, this change can cause tables to be aliased
differently, so if you were graphing previously joined datasets
and then filtering using the automatically generated aliases, you
might need to modify your code.
* The DataObjects (do) adpater no longer supports DataObjects 0.9.x.
* The Dataset#virtual_row_block_call private instance method has
been removed.
* Sequel's timezone support was significantly refactored, so if you
had any custom modifications to the timezone support, they might
need to be refactored as well.
* The SQL generation code was significantly refactored, so if you
had any custom modifications in that area, you might need to
refactor as well.
Thanks,
Jeremy
* {Website}[http://sequel.rubyforge.org]
* {Source code}[http://github.com/jeremyevans/sequel]
* {Bug tracking}[http://code.google.com/p/ruby-sequel/issues/list]
* {Google group}[http://groups.google.com/group/sequel-talk]
* {RDoc}[http://sequel.rubyforge.org/rdoc]
--
Posted via http://www.ruby-forum.com/.