[#349422] Date.parse('17:26:33 Oct 31, 2009') returns invalid date — Jacob Gorban <jacob.gorban@...>

Hi,

13 messages 2009/11/01

[#349519] All Gems Down? — Joshua Ballanco <jballanc@...>

I think I must be the only one using allgems.ruby-forum.com. It seems

17 messages 2009/11/03

[#349527] Ruby Inline over two times slower under 1.9 than under 1.8? — "Shot (Piotr Szotkowski)" <shot@...>

I=E2=80=99m starting to dip my toes in non-Ruby coding (for performance rea=

13 messages 2009/11/03
[#349564] Re: Ruby Inline over two times slower under 1.9 than under 1.8? — Ryan Davis <ryand-ruby@...> 2009/11/03

[#350186] Re: Ruby Inline over two times slower under 1.9 than under 1.8? — "Shot (Piotr Szotkowski)" <shot@...> 2009/11/11

Ryan Davis:

[#350196] Re: Ruby Inline over two times slower under 1.9 than under 1.8? — Roger Pack <rogerpack2005@...> 2009/11/11

> — Shot, who’s off to play with RubyToC now. :)

[#350228] Re: Ruby Inline over two times slower under 1.9 than under 1.8? — "Shot (Piotr Szotkowski)" <shot@...> 2009/11/11

Roger Pack:

[#349640] Odd : a = Hash.new(Hash.new) — Aldric Giacomoni <aldric@...>

irb(main):086:0> a = Hash.new(Hash.new)

13 messages 2009/11/04
[#349641] Re: Odd : a = Hash.new(Hash.new) — Aldric Giacomoni <aldric@...> 2009/11/04

Aldric Giacomoni wrote:

[#349685] Create HTML files using RUBY — Krithika San <skrithikaa@...>

Hi,

23 messages 2009/11/04
[#349690] Re: Create HTML files using RUBY — Marnen Laibow-Koser <marnen@...> 2009/11/04

Krithika San wrote:

[#349691] Re: Create HTML files using RUBY — Krithika San <skrithikaa@...> 2009/11/04

Hi Marnen,

[#349692] Re: Create HTML files using RUBY — Marnen Laibow-Koser <marnen@...> 2009/11/04

Krithika San wrote:

[#349720] Executing one of several ruby objects — "dhf0820@..." <dhf0820@...>

I am trying to write a program that will load a series of DSLs (ruby

11 messages 2009/11/05

[#349849] RCR enumerable extra into core — Roger Pack <rogerpack2005@...>

I'm considering suggesting that the base functionality for the

25 messages 2009/11/08
[#349853] Re: RCR enumerable extra into core — "David A. Black" <dblack@...> 2009/11/08

Hi --

[#349996] Re: RCR enumerable extra into core — Roger Pack <rogerpack2005@...> 2009/11/09

[#349888] Using Nokogiri — jzakiya <jzakiya@...>

I'm trying to scrape some data off websites using nokogiri

18 messages 2009/11/08

[#349926] FileString - request for comments — apeiros@...

Hi there

15 messages 2009/11/09
[#349931] Re: FileString - request for comments — James Edward Gray II <james@...> 2009/11/09

On Nov 8, 2009, at 7:47 PM, apeiros@gmx.net wrote:

[#349987] Berkeley DB BDB Install on Windows — david <davidhooey@...>

I've been scripting in Ruby (and Rails) for about two years now, but

14 messages 2009/11/09

[#350007] Good or best way to allocate a large array — Ralph Shnelvar <ralphs@...32.com>

Newbie here:

45 messages 2009/11/09
[#350017] Re: Good or best way to allocate a large array — Marnen Laibow-Koser <marnen@...> 2009/11/09

Ralph Shnelvar wrote:

[#350019] Re: Good or best way to allocate a large array — Ralph Shnelvar <ralphs@...32.com> 2009/11/09

Marnen,

[#350023] Re: Good or best way to allocate a large array — Marnen Laibow-Koser <marnen@...> 2009/11/09

Ralph Shnelvar wrote:

[#350029] Re: Good or best way to allocate a large array — Ralph Shnelvar <ralphs@...32.com> 2009/11/09

Marnen,

[#350042] Re: Good or best way to allocate a large array — "Florian Frank" <flori@...> 2009/11/09

Ralph Shnelvar wrote:

[#350045] Re: Good or best way to allocate a large array — Ralph Shnelvar <ralphs@...32.com> 2009/11/09

Florian,

[#350047] Re: Good or best way to allocate a large array — Rick DeNatale <rick.denatale@...> 2009/11/09

On Mon, Nov 9, 2009 at 5:46 PM, Ralph Shnelvar <ralphs@dos32.com> wrote:

[#350048] Re: Good or best way to allocate a large array — Ralph Shnelvar <ralphs@...32.com> 2009/11/10

Rick,

[#350053] Re: Good or best way to allocate a large array — Florian Gilcher <flo@...> 2009/11/10

Hi,

[#350142] Calling a subprocess with specific arguments and capturing its output? — Dan Q <quinxex@...>

Hi. I haven't written Ruby in a while, and I was wondering if someone

9 messages 2009/11/10

[#350147] Roman Numerals (Arrgh!) — Rick Barrett <chngth3wrld@...>

I have a homework assignment where I have to convert an inputted integer

22 messages 2009/11/10
[#350150] Re: Roman Numerals (Arrgh!) — Rob Biedenharn <Rob@...> 2009/11/11

On Nov 10, 2009, at 6:56 PM, Rick Barrett wrote:

[#350152] Re: Roman Numerals (Arrgh!) — Gennady Bystritsky <Gennady.Bystritsky@...> 2009/11/11

On Nov 10, 2009, at 5:37 PM, Rob Biedenharn wrote:

[#350156] Re: Roman Numerals (Arrgh!) — Rob Biedenharn <Rob@...> 2009/11/11

On Nov 10, 2009, at 8:49 PM, Gennady Bystritsky wrote:

[#350159] Re: Roman Numerals (Arrgh!) — Gennady Bystritsky <Gennady.Bystritsky@...> 2009/11/11

[#350290] DRYing a Regex — RichardOnRails <RichardDummyMailbox58407@...>

I've got a routine that works fine at building an array of upper-case

42 messages 2009/11/12
[#350311] Re: DRYing a Regex — RichardOnRails <RichardDummyMailbox58407@...> 2009/11/13

On Nov 12, 6:50=A0pm, James Edward Gray II <ja...@graysoftinc.com>

[#350367] Naming conventions -- was: Re: DRYing a Regex — Marnen Laibow-Koser <marnen@...> 2009/11/14

RichardOnRails wrote:

[#350368] Re: Naming conventions -- was: Re: DRYing a Regex — James Edward Gray II <james@...> 2009/11/14

On Nov 13, 2009, at 10:11 PM, Marnen Laibow-Koser wrote:

[#350369] Re: Naming conventions -- was: Re: DRYing a Regex — Marnen Laibow-Koser <marnen@...> 2009/11/14

James Edward Gray II wrote:

[#350415] Re: Naming conventions -- was: Re: DRYing a Regex — "David A. Black" <dblack@...> 2009/11/14

Hi --

[#350426] Re: Naming conventions -- was: Re: DRYing a Regex — Marnen Laibow-Koser <marnen@...> 2009/11/14

David A. Black wrote:

[#350359] Trajectories — Thijs Leeflang <t_leeflang@...>

hello,

60 messages 2009/11/13
[#350444] Re: Trajectories — Marnen Laibow-Koser <marnen@...> 2009/11/14

Thijs Leeflang wrote:

[#350446] Re: Trajectories — Eleanor McHugh <eleanor@...> 2009/11/15

On 14 Nov 2009, at 23:40, Marnen Laibow-Koser wrote:

[#350447] Re: Trajectories — Marnen Laibow-Koser <marnen@...> 2009/11/15

Eleanor McHugh wrote:

[#350449] Re: Trajectories — Eleanor McHugh <eleanor@...> 2009/11/15

On 15 Nov 2009, at 00:42, Marnen Laibow-Koser wrote:

[#350451] Re: Trajectories — Marnen Laibow-Koser <marnen@...> 2009/11/15

Eleanor McHugh wrote:

[#350509] Re: Trajectories — Rick DeNatale <rick.denatale@...> 2009/11/15

On Sat, Nov 14, 2009 at 8:19 PM, Marnen Laibow-Koser <marnen@marnen.org> wr=

[#350523] Re: Trajectories — Marnen Laibow-Koser <marnen@...> 2009/11/15

Rick Denatale wrote:

[#350524] Re: Trajectories — Eleanor McHugh <eleanor@...> 2009/11/15

On 15 Nov 2009, at 23:02, Marnen Laibow-Koser wrote:

[#350529] Re: Trajectories — Todd Benson <caduceass@...> 2009/11/16

On Sun, Nov 15, 2009 at 5:32 PM, Eleanor McHugh

[#350532] Re: Trajectories — Eleanor McHugh <eleanor@...> 2009/11/16

On 16 Nov 2009, at 01:12, Todd Benson wrote:

[#350538] Re: Trajectories — Marnen Laibow-Koser <marnen@...> 2009/11/16

Eleanor McHugh wrote:

[#350577] Re: Trajectories — Paul Smith <paul@...> 2009/11/16

On Mon, Nov 16, 2009 at 2:57 AM, Marnen Laibow-Koser <marnen@marnen.org> wr=

[#350593] Re: Trajectories — Marnen Laibow-Koser <marnen@...> 2009/11/16

Paul Smith wrote:

[#350600] Re: Trajectories — Paul Smith <paul@...> 2009/11/16

On Mon, Nov 16, 2009 at 3:18 PM, Marnen Laibow-Koser <marnen@marnen.org> wrote:

[#350602] Re: Trajectories — Marnen Laibow-Koser <marnen@...> 2009/11/16

Paul Smith wrote:

[#350628] Re: Trajectories — Caleb Clausen <vikkous@...> 2009/11/17

On 11/16/09, Marnen Laibow-Koser <marnen@marnen.org> wrote:

[#350629] Re: Trajectories — Marnen Laibow-Koser <marnen@...> 2009/11/17

Caleb Clausen wrote:

[#350645] Re: Trajectories — Caleb Clausen <vikkous@...> 2009/11/17

On 11/16/09, Marnen Laibow-Koser <marnen@marnen.org> wrote:

[#350454] How do I get a random number between two random numbers? — Alex Untitled <somebodydc691n@...>

I want to create a program that asks you to guess a number between two

12 messages 2009/11/15

[#350476] Traversing the contents of a proc (for a DSL) — Siemen Baader <siemenbaader@...>

Hi List,

11 messages 2009/11/15

[#350485] Using activerecord with mysql — Rob Mauchel <rmauchel@...>

Hi All,

13 messages 2009/11/15

[#350526] Newbie question: Defining a numeric type — Seebs <usenet-nospam@...>

I have a type which has a bit of internal magic, but fundamentally, I want

32 messages 2009/11/16

[#350535] Any official name for Ruby's class which makes "class methods"? — Hunt Jon <jona.hunt777@...>

We all know Ruby really doesn't have class methods.

20 messages 2009/11/16
[#350539] Re: Any official name for Ruby's class which makes "class me — Marnen Laibow-Koser <marnen@...> 2009/11/16

Hunt Jon wrote:

[#350682] Re: Any official name for Ruby's class which makes "class me — "David A. Black" <dblack@...> 2009/11/17
[#350689] Re: Any official name for Ruby's class which makes "class me — Marnen Laibow-Koser <marnen@...> 2009/11/17

David A. Black wrote:

[#350698] Re: Any official name for Ruby's class which makes "class me — "David A. Black" <dblack@...> 2009/11/17

[#350590] Google Wave: A new type of "Ruby Quiz" ? — Aldric Giacomoni <aldric@...>

Google Wave is, according to Google, "the new email". It combines email,

21 messages 2009/11/16

[#350594] something went wrong — Dev Tri <divyanshutri@...>

16 messages 2009/11/16

[#350669] What is the difference between the two following pieces of c — Doney Kaka <doneysr@...>

Don't really know where to go with this one, but I gotta know...

10 messages 2009/11/17

[#350679] Class inside a Method Body — Mike Stephens <rubfor@...>

I have a class that works fine if I declare it outside of anything. If

15 messages 2009/11/17

[#350705] Special characters in csv header using fastercsv — John Mcleod <john.mcleod@...>

Hello all,

17 messages 2009/11/17
[#350709] Re: Special characters in csv header using fastercsv — James Edward Gray II <james@...> 2009/11/17

On Nov 17, 2009, at 10:24 AM, John Mcleod wrote:

[#350710] Re: Special characters in csv header using fastercsv — John Mcleod <john.mcleod@...> 2009/11/17

James,

[#350712] Re: Special characters in csv header using fastercsv — James Edward Gray II <james@...> 2009/11/17

On Nov 17, 2009, at 10:38 AM, John Mcleod wrote:

[#350719] Re: Special characters in csv header using fastercsv — John Mcleod <john.mcleod@...> 2009/11/17

I'm not sure if the placement is correct but I'm still getting "Error

[#350810] Exact (LISP-ish) calculations in Ruby? — Aldric Giacomoni <aldric@...>

Has anyone written a gem for exact calculations? The kind one would find

25 messages 2009/11/18

[#350829] Ruby/tk Help Please — Sean Ob <sob4ever33@...>

I am a complete beginner when it comes to programming and i need some

20 messages 2009/11/18
[#350830] Re: Ruby/tk Help Please — Marnen Laibow-Koser <marnen@...> 2009/11/18

Sean Ob wrote:

[#350924] How to strip ruby comments in a ruby line of code? — Alexandre Mutel <alexandre_mutel@...>

Short description : My question is : do you know any available method,

17 messages 2009/11/19

[#350969] Re-opening an existing module and changing a method — Aldric Giacomoni <aldric@...>

"I hear and I forget; I see and I remember; I do and I understand."

11 messages 2009/11/19

[#351010] RubyForge gem index is no more — Tom Copeland <tom@...>

Hello -

14 messages 2009/11/20

[#351084] Distinct Sets (#225) — Daniel Moore <yahivin@...>

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

21 messages 2009/11/21
[#351111] Re: [QUIZ] Distinct Sets (#225) — brabuhr@... 2009/11/21

On Fri, Nov 20, 2009 at 9:23 PM, Daniel Moore <yahivin@gmail.com> wrote:

[#351170] Re: [QUIZ] Distinct Sets (#225) — Rob Biedenharn <Rob@...> 2009/11/22

[#351171] Re: Distinct Sets (#225) — lith <minilith@...> 2009/11/22

> http://gist.github.com/240457

[#351279] Re: Distinct Sets (#225) — Rob Biedenharn <Rob@...> 2009/11/23

On Nov 22, 2009, at 1:51 AM, lith wrote:

[#351137] Order of evaluation and precedence — Seebs <usenet-nospam@...>

In _The Ruby Programming Language_, it is asserted that order of evaluation

11 messages 2009/11/21

[#351245] More on psuedo arrays; Better way? — Ralph Shnelvar <ralphs@...32.com>

Newbie here:

15 messages 2009/11/23
[#351266] Re: More on psuedo arrays; Better way? — Marnen Laibow-Koser <marnen@...> 2009/11/23

Ralph Shnelvar wrote:

[#351267] Re: More on psuedo arrays; Better way? — Brian Candler <b.candler@...> 2009/11/23

Marnen Laibow-Koser wrote:

[#351271] Re: More on psuedo arrays; Better way? — Ralph Shnelvar <ralphs@...32.com> 2009/11/23

BC> Marnen Laibow-Koser wrote:

[#351297] ideas for a "parameter sweep" program? — Diego Virasoro <diego.virasoro@...>

Hello,

11 messages 2009/11/23

[#351328] Warning: instance variable @foo not initialized — Seebs <usenet-nospam@...>

Running some simple tests with Prawn, I am getting thousands of lines

13 messages 2009/11/24

[#351367] Difference between << and += for Strings and Arrays. Bug? — Pieter Hugo <pieter@...>

Hi

14 messages 2009/11/24
[#351373] Re: Difference between << and += for Strings and Arrays. Bug? — Tom Stuart <tom@...> 2009/11/24

2009/11/24 Pieter Hugo <pieter@internext.co.za>:

[#351377] Re: Difference between << and += for Strings and Arrays. Bug? — Pieter Hugo <pieter@...> 2009/11/24

Hi Guys

[#351426] Ruby internals & other questions — Ralph Shnelvar <ralphs@...32.com>

Is there a document or website that describes how Ruby works?

17 messages 2009/11/25

[#351448] Ruby a good choice for CGI? — Nick Dr <nickhannum@...>

Ive been messing around with Ruby for a few weeks now, and I'm fairly

28 messages 2009/11/25
[#351452] Re: Ruby a good choice for CGI? — David Masover <ninja@...> 2009/11/25

On Wednesday 25 November 2009 01:12:19 pm Nick Dr wrote:

[#351453] Re: Ruby a good choice for CGI? — Marnen Laibow-Koser <marnen@...> 2009/11/25

David Masover wrote:

[#351455] Re: Ruby a good choice for CGI? — David Masover <ninja@...> 2009/11/25

On Wednesday 25 November 2009 02:38:32 pm Marnen Laibow-Koser wrote:

[#351456] Re: Ruby a good choice for CGI? — Judson Lester <nyarly@...> 2009/11/25

On Wed, Nov 25, 2009 at 12:52 PM, David Masover <ninja@slaphack.com> wrote:

[#351461] Re: Ruby a good choice for CGI? — David Masover <ninja@...> 2009/11/25

On Wednesday 25 November 2009 03:00:49 pm Judson Lester wrote:

[#351508] Ruby byte access to disk sectors like dd does — Gary Hasson <gary@...>

I have been unable to find any reference to Ruby methods that provide

16 messages 2009/11/26

[#351548] Class variables, instance variables, singleton; Ruby v. C++ — Ralph Shnelvar <ralphs@...32.com>

Newb here coming from C++

31 messages 2009/11/27
[#351570] Re: Class variables, instance variables, singleton; Ruby v. C++ — Steve Wilhelm <steve@...831.com> 2009/11/28

Ralph Shnelvar wrote:

[#351579] Re: Class variables, instance variables, singleton; Ruby v. C++ — "David A. Black" <dblack@...> 2009/11/28

Hi --

[#351586] Re: Class variables, instance variables, singleton; Ruby v. C++ — Ralph Shnelvar <ralphs@...32.com> 2009/11/28

DAB> And of course this is one of the (many) problems with class variables:

[#351572] Local variables can't be accessed from outside, right? — Michael Winterstein <parzival@...>

Hi, I've been trying to figure out metaprogramming and I've mostly got

9 messages 2009/11/28

[#351637] Best way to distribute an app — Omar Campos <hypermeister@...>

Hello everyone,

16 messages 2009/11/29
[#351682] Re: Best way to distribute an app — David Masover <ninja@...> 2009/11/29

On Saturday 28 November 2009 09:03:12 pm Omar Campos wrote:

[#351655] ruby language parser in ruby — Brian Candler <b.candler@...>

I'm looking for a ruby language parser written in ruby, that I can hack

27 messages 2009/11/29

[#351753] have a problem with the loops and variable — Sajjad Po <magicc0d3r@...>

Hi Friends.

20 messages 2009/11/30
[#351756] Re: have a problem with the loops and variable — Michael Linfield <globyy3000@...> 2009/11/30

[#351788] Re: have a problem with the loops and variable — Marnen Laibow-Koser <marnen@...> 2009/12/01

Michael Linfield wrote:

[#351796] Re: have a problem with the loops and variable — Sajjad Po <magicc0d3r@...> 2009/12/01

thank you friends.

[#351798] Re: have a problem with the loops and variable — Sajjad Iran <magicc0d3r@...> 2009/12/01

I want create a program like this.

[#351833] Re: have a problem with the loops and variable — Michael Linfield <globyy3000@...> 2009/12/01

Sajjad Po wrote:

[#351835] Re: have a problem with the loops and variable — Marnen Laibow-Koser <marnen@...> 2009/12/01

Michael Linfield wrote:

[#351840] Re: have a problem with the loops and variable — Michael Linfield <globyy3000@...> 2009/12/01

For something small such as testing lets say a million keys, the

[#351842] Re: have a problem with the loops and variable — Marnen Laibow-Koser <marnen@...> 2009/12/02

Michael Linfield wrote:

[#351755] Problem trying to get a constant with correct scope — Alexandre Mutel <alexandre_mutel@...>

I'm trying to get a constant inside a class (but i have to do it outside

11 messages 2009/11/30

ANN: Sequel 3.6.0 Released

From: Jeremy Evans <code@...>
Date: 2009-11-03 19:01:48 UTC
List: ruby-talk #349558
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.6.0 has been released and should be available on the gem
mirrors.  The 3.6.0 release adds numerous improvements:

New Features
------------

* Dataset#filter and related methods now accept a string with named
  placeholders, and a hash with placeholder values:

    ds.filter('copies_sold > :sales', :sales=>500000)

  Sequel's general support for this syntax is nicer:

    ds.filter{copies_sold > 500000}

  But named placeholder support can make it easier to port code
  from other database libraries.  Also, it works much better than
  the ? placeholder support if you have a long SQL statement:

    DB['SELECT :n FROM t WHERE p > :q AND p < :r', :n=>1,:q=>2,:r=>3]

  Sequel doesn't subsitute values that don't appear in the hash:

    ds.where('price < :p AND id in :ids', :p=>100)
    # WHERE (price < 100 AND id in :ids)

  This makes it easier to spot missed placeholders, and avoids issues
  with PostgreSQL's :: casting syntax or : inside string literals.

* The Model add_ association method now accepts a hash and creates
  a new associated model object associated to the receiver:

    Artist[:name=>'YJM'].add_album(:name=>'RF')

* The Model remove_ association method now accepts a primary key
  and removes the associated model object from the association. For
  models using composite primary keys, an array of primary key values
  can be used.  Example:

    Artist[:name=>'YJM'].remove_album(1) # regular pk
    Artist[:name=>'YJM'].remove_album([2, 3]) # composite pk

* Dataset#bind was added, allowing you to bind values before calling
  Dataset#call.  This is more consistent with Sequel's general
  approach where queries can be built in any order.

* The native postgres adapter now has Dataset#use_cursor, which
  allows you to process huge datasets without keeping all records in
  memory.  The default number of rows per cursor fetch is 1000, but
  that can be modified:

    DB[:huge_table].use_cursor.each{|r| p r}
    DB[:huge_table].use_cursor(:rows_per_fetch=>10000).each{|r| p r}

  This probably won't work with prepared statements or
  bound variables.

* The nested_attributes plugin now adds newly created objects to the
  cached association array immediately, even though the changes
  are not persisted to the database until after the object is saved.
  The reasoning for this is that otherwise there is no way to access
  the newly created associated objects before the save, and no way
  to access them at all if validation fails.

  This makes the nested_attributes plugin much easier to use, since
  now you can just iterate over the cached association array when
  building the form.  If validation fails, it will have the newly
  created failed objects in the array, so you can easily display the
  form as the user entered it for them to make changes.

  This change doesn't affect many_to_one associations, since those
  don't have a cached association array.  This also does not affect
  updating existing records, since those are already in the cached
  array.

* You can now easily override the default options used in the
  validation_helpers plugin (the recommended validation plugin).
  Options can be overridden at a global level:

    Sequel::Plugins::ValidationHelpers::DEFAULT_OPTIONS[:format].
      merge!(:message=>"incorrect format", :allow_missing=>true)

  Options can also be overridden on a per-class level:

    class Album < Sequel::Model
      plugin :validation_helpers
      DEFAULT_VALIDATION_OPTIONS = {
       :format=>{:message=>"incorrect format", :allow_missing=>true}}

      private

      def default_validation_helpers_options(type)
        super.merge(DEFAULT_VALIDATION_OPTIONS[type] || {})
      end
    end

* You can now use a proc instead of a string for the
  validation_helpers :message option.  This should allow much
  easier internationalization support.  If a proc is given, Sequel
  calls it to get the format string to use.  Whether the proc should
  take an argument depends on whether the associated validation
  method takes an argument before the array of columns to validate,
  and the argument provided is what is passed to the proc.  The
  exception to this is the validates_not_string method, which doesn't
  take an argument, but does pass one to the proc (a symbol with the
  schema type of the column).

  Combined with the above default option support, full
  internationalization support for the validation_helpers plugin
  should be fairly easy.

* The nested_attributes plugin now accepts a :fields option that
  specifies the fields that are allowed.  If specified, the
  plugin will use set_only instead of set when mass assigning
  attributes.  Without this, the only way to control which fields
  are allowed is to set allowed/restricted attributes at a class
  level in the associated class.

* Associations now accept a :distinct option which uses the SQL
  DISTINCT clause.  This can be used instead of :uniq for
  many_to_many and many_through_many associations to handle
  the uniqueness in the database instead of in ruby.  It can
  also be useful for one_to_many associations to models that
  don't have primary keys.

* The caching plugin now accepts an :ignore_exceptions option that
  allows it to work with memcached (which raises exceptions instead
  of returning nil for missing records).

* Sequel now emulates JOIN USING poorly using JOIN ON for databases
  that don't support JOIN USING (MSSQL and H2).  This isn't
  guaranteed to work for all queries, since USING and ON have
  different semantics, but should work in most cases.

* The MSSQL shared adapter now supports insert_select, for faster
  model object creation.  If for some reason you need to disable it,
  you can use disable_insert_output.

* Model#modified! has been added which explicitly marks the object
  as modified.  So even if no column values have been modified,
  calling save_changes/update will still run through the regular
  save process and call all before and after save/update hooks.

* Model#marshallable! has been added which removes unmarshallable
  attributes from the object.  Previously, you couldn't marshal
  a saved model object because it contained a dataset with a
  singleton class.  Custom _dump and _load methods could be used
  instead, but this approach is easier to implement.

* Dataset#literal_other now calls sql_literal on the object with
  the current dataset instance, if the object responds to it.
  This makes it easier to support the literalization of arbitrary
  objects.

  Note that if the object is a subclass of a class handled by
  an existing dataset literalization method, you cannot use this
  method.  You have to override the specific Dataset#literal_* method
  in that case.

* Model#save_changes now accepts an option hash that is passed to
  save:

    album.save_changes(:validate=>false)

* A bunch of Dataset#*_join methods have been added, for specific
  join types:

  * cross_join
  * natural_join
  * full_join
  * left_join
  * right_join
  * natural_full_join
  * natural_left_join
  * natural_right_join

  Previously, you had to use join_table(:cross, ...) to use a CROSS
  JOIN.

* You can now create clustered indexes on Microsoft SQL Server using
  the :clustered option.

* AssociationReflection#associated_object_keys has been added,
  specifying the keys in the associated model object that are related
  to this association.

* Sequel::SQL::SQLArray#to_a was added.

Other Improvements
------------------

* Constant lookup in virtual row blocks now works correctly in ruby
  1.9.  Virtual row blocks are based on BasicObject on ruby 1.9,
  which doesn't allow referencing objects in the top level scope. So
  the following code would cause an error on 1.9:

    DB[:bonds].filter{maturity_date > Time.now}

  Sequel now uses a Sequel::BasicObject class on 1.9 with a
  const_missing that looks up constants in Object, which allows the
  above code to work.

* Sequel no longer attempts to load associated objects when
  one of the key fields in the current table is NULL.  This fixes
  the behavior when the :primary_key option for the association
  is used to point to a non-primary key.

  A consequence of this change is that attempting to load a
  *_to_many association for a new model object now returns
  an empty array instead of raising an exception.  This has its
  own advantage of allowing the same association viewing code
  to work on both new and existing objects.  Previously, you had
  to actively avoid calling the association method on new objects,
  or Sequel would raise an exception.

* Dataset aggreate methods (sum/avg/min/max/range/interval) now
  work correctly with limited, grouped, or compound datasets.
  Previously, count worked with them, but other aggregate methods
  did not.  These methods now use a subquery if called on a
  limited, grouped or compound dataset.

* It is no longer required to have an existing GROUP BY clause
  to use a HAVING clause (except on SQLite, which doesn't permit
  it).  Sequel has always had this limitation, but it's not required
  by the SQL standard, and there are valid reasons to use HAVING
  without GROUP BY.

* Sequel will now emulate support for databases that don't support
  multiple column IN/NOT IN syntax, such as MSSQL and SQLite:

    ds.filter([:col1, :col2]=>[[1, 2], [3, 4]].sql_array)
    # default:  WHERE (col1, col2) IN ((1, 2), (3, 4))
    # emulated: WHERE (((col1 = 1) AND (col2 = 2)) OR
    #                  ((col1 = 3) AND (col2 = 4)))

  This is necessary for eager loading associated objects for models
  with composite primary keys.

* Sequel now emulates :column.ilike('blah%') for case insensitive
  searches on MSSQL and H2.  MSSQL is case insensitive by default,
  so it is the same as like.  H2 is case sensitive, so Sequel
  uses a case insensitive cast there.

* The nested_attributes plugin no longer allows modification of
  keys related to the association.  This fixes a possible security
  issue with the plugin, where a user could associate the nested
  record to a different record.  For example:

    Artist.one_to_many :albums
    Artist.plugin :nested_attributes
    Artist.nested_attributes :albums
    artist = Artist.create
    artist2 = Artist.create
    album = Album.create
    artist.add_album(album)
    artist.albums_attributes = [{:id=>album.id,
     :artist_id=>artist2.id}]
    artist.save

* The one_to_many remove_* association method now makes sure that the
  object to be removed is currently associated to this object.
  Before, the method could be abused to disassociate the object from
  whatever object it was associated to.

* Model add_ and remove_ association methods now check that the passed
  object is of the correct class.

* Calling the add_* association method no longer adds the record
  to the cached association array if the object is already in the
  array.  Previously, Sequel did this for reciprocal associations,
  but not for regular associations.

  This makes the most sense for one_to_many associations, since
  those can only be associated to the object once.  For many_to_many
  associations, if you want an option to disable the behavior, please
  bring it up on the Sequel mailing list.

* An array with a string and placeholders that is passed to
  Dataset#filter is no longer modified.  Previously:

    options = ["name like ?", "%dog%"]
    DB[:players].where(options)
    options # => ["%dog%"]

* Getting the most recently inserted autoincremented primary key
  is now optimized when connecting to MySQL via JDBC.

* Model.inherited now calls Class.inherited.

* The MSSQL shared adapter once again works on ruby 1.9.  It was
  broken in 3.5.0 due to minor syntax issues.

* The force_encoding plugin now handles refreshing an existing
  object, either explicitly or implicitly when new objects are
  created.

  To use the force_encoding plugin with the identity_map plugin, the
  identity_map plugin should be loaded first.

* Using nil as a bound variable now works on PostgreSQL.  Before,
  Sequel would incorrectly use "" instead of NULL, since it
  transformed all objects to strings before binding them.  Sequel
  now binds the objects directly.

* The Amalgalite adapter is now significantly faster, especially for
  code that modifies the schema or submits arbitrary SQL statements
  using Database <<, run, or execute_ddl.

* Model#save_changes is now used when updating existing associated
  objects in the nested_attributes plugin.  This should be
  significantly faster for the common case of submitting a complex
  form with nested objects without making modifications.

* You can now prepare insert statements that take multiple arguments,
  such as insert(1, 2, 3) and insert(columns, values).

* Dataset#group_and_count now supports aliased columns.

* Adding indexes to tables outside the default schema now works.

* Eager graphing now works better with models that use aliased tables.

* Sequel now correctly parses the column schema information for tables
  in a non-default schema on Microsoft SQL Server.

* changed_columns is now cleared for when saving new model objects
  for adapters that support insert_select, such as PostgreSQL.

* Dataset#replace on MySQL now works correctly when default values
  are used.

* Dataset#lock on PostgreSQL now works correctly.

* Dataset#explain now works correctly on SQLite, and works using
  any adapter.  It also works correctly on Amalgalite.

* The JDBC adapter now handles binding Time arguments correctly when
  using prepared statements.

* Model add_ and remove_ association methods now have more
  descriptive exception messages.

* Dataset#simple_select_all? now ignores options that don't affect
  the SQL, such as :server.

* Dataset#window in the PostgreSQL adapter now respects existing
  named windows.

* Sequel now better handles a failure to begin a new transaction.

* The dataset code was split into some additional files for improved
  readability.

* Many documentation improvements were made.

Backwards Compatibility
-----------------------

* Model::Errors no longer uses a default proc, but emulates one in the
  [] method.  This is unlikely to have a negative affect unless you
  are calling a method on it that doesn't call [] (maybe using it in
  a C extension?).

* Model#table_name now only provides the alias if an aliased table is
  used.

* The Sequel::Dataset::STOCK_COUNT_OPTS constant has been removed.

* Dataset#lock on PostgreSQL now returns nil instead of a dataset.

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/.

In This Thread

Prev Next