[#397049] Question on Learning Ruby the Hard Way — Michael Sung <lists@...>
Hi, I have a question on Exercise 43 of Learning Ruby the Hard Way.
[#397063] ruby_rhymes question — Amiee Monticello <lists@...>
I am interested in using ruby_rhymes, but have no idea how to use it. I
Yes, however, I am just learning about ruby and working with the basic
What have you tried? You might want to start with a text file that includes t=
[#397070] how to sort this nested hash — "yibin z." <lists@...>
s = {'s1'=>{'hn1'=>{'15'=> {'m1'=> ['aa', 'bb'] }}}, 's3'=>{'hn2'=>{'10'
[#397093] Using binding + set_trace_func to capture execution state — Reginald Tan <lists@...>
Hi guys, I'm interested in building a program that will display the
Reginald Tan писал 03.07.2012 05:11:
>
On Tue, Jul 3, 2012 at 8:05 AM, Reginald Tan <lists@ruby-forum.com> wrote:
>
Have you tried somehow using continuations?
Bartosz Dziewoński писал 03.07.2012 15:23:
Peter Zotov wrote in post #1067270:
You can use the `local_variables` method to get a list of local
[#397115] Copying Files — "Alex C." <lists@...>
Hi,
Hi,
Jan E. wrote in post #1067228:
Ryan Davis wrote in post #1067277:
Alex C. wrote in post #1067346:
Jan E. wrote in post #1067354:
Alex C. wrote in post #1067355:
Jan E. wrote in post #1067359:
Alex C. wrote in post #1067360:
[#397119] ruby linux tproxy and routing bgp\ospf\others — Eliezer Croitoru <eliezer@...>
two questions:
[#397122] passing ARGV to class methods — Neubyr Neubyr <lists@...>
I have been writing command-line programs using a pattern similar to
[#397126] Newbie needs help with parsing a file — "Jon R." <lists@...>
I have a file with a long string in the following format:
On Wed, 4 Jul 2012 07:52:16 +0900
[#397129] if x.condition, set x to y — wutang paul <lists@...>
Hi, big time newbie here.
[#397140] ARGF: No switch to STDIN after all files? — Iazel Datenshi <lists@...>
I've started learning Ruby and trying to do the first (stupid) program
[#397165] Green threads in 1.9.* ? — rex goxman <lists@...>
I am new to Ruby. I am somewhat surprised that I was not able to find
Hi,
It depends on the interpreter. This post may help you get the picture:
@jacques1 and fxn above:
On Wed, Jul 4, 2012 at 1:45 PM, rex goxman <lists@ruby-forum.com> wrote:
If jacques1 is right, then there are no green threads, just kernel
rex goxman =D0=BF=D0=B8=D1=81=D0=B0=D0=BB 04.07.2012 16:26:
Peter Zotov wrote in post #1067393:
<<There are definitely many reasons to prefer native threads over green
On Thu, Jul 5, 2012 at 6:38 AM, rex goxman <lists@ruby-forum.com> wrote:
Tony Arcieri wrote in post #1067551:
On Thu, Jul 5, 2012 at 10:26 AM, rex goxman <lists@ruby-forum.com> wrote:
Tony Arcieri wrote in post #1067563:
On Thu, Jul 5, 2012 at 12:31 PM, rex goxman <lists@ruby-forum.com> wrote:
Tony Arcieri wrote in post #1067609:
On Thu, Jul 5, 2012 at 8:24 PM, rex goxman <lists@ruby-forum.com> wrote:
On Fri, Jul 6, 2012 at 8:52 AM, Ryan Davis <ryand-ruby@zenspider.com> wrote:
Robert Klemme wrote in post #1067663:
On Fri, Jul 6, 2012 at 5:40 AM, rex goxman <lists@ruby-forum.com> wrote:
Tony Arcieri wrote in post #1067715:
On Sat, Jul 7, 2012 at 12:57 AM, rex goxman <lists@ruby-forum.com> wrote:
[#397184] Compute the lexicographically next bit permutation — "Raghu G." <lists@...>
Compute the lexicographically next bit permutation
[#397185] Insert letters of the alphabet between the original letters of a string — Joao Silva <lists@...>
Hi All.
[#397198] the best way to match these domains. — Eliezer Croitoru <eliezer@...>
thanks in advance i need a bit help to break the ice that my head is in.
On Thu, Jul 5, 2012 at 4:13 AM, Eliezer Croitoru <eliezer@ngtech.co.il> wrote:
On 7/5/2012 10:03 AM, Robert Klemme wrote:
On Thu, Jul 5, 2012 at 10:40 PM, Eliezer Croitoru <eliezer@ngtech.co.il> wrote:
On 7/6/2012 9:21 AM, Robert Klemme wrote:
On Sat, Jul 7, 2012 at 5:32 AM, Eliezer Croitoru <eliezer@ngtech.co.il> wrote:
On 7/10/2012 12:08 PM, Robert Klemme wrote:
On Wed, Jul 11, 2012 at 4:37 AM, Eliezer Croitoru <eliezer@ngtech.co.il> wrote:
On 7/11/2012 9:40 AM, Jes俍 Gabriel y Gal疣 wrote:
On Wed, Jul 11, 2012 at 9:22 AM, Eliezer Croitoru <eliezer@ngtech.co.il> wr=
On 7/11/2012 10:49 AM, Jes俍 Gabriel y Gal疣 wrote:
On Wed, Jul 11, 2012 at 6:18 PM, Eliezer Croitoru <eliezer@ngtech.co.il> wrote:
On Wed, Jul 11, 2012 at 4:37 AM, Eliezer Croitoru <eliezer@ngtech.co.il> wrote:
On 7/12/2012 9:59 PM, Robert Klemme wrote:
[#397205] question: p expression — "smoothedatol412 @..." <lists@...>
Lately I have been going through some Ruby books and I keep coming up on
[#397213] self.clone.replace(super)? — Soichi Ishida <lists@...>
Hi. Could anyone help me understand the following? I am reading a
[#397228] Unable to do the barcode scanning for windows mobile platform — santosh panigrahy <lists@...>
I am trying to do barcode scanning from the sample api given in
[#397231] Can you call private methods with explicit receivers? — Jingjing Duan <lists@...>
My understanding is the answer is no, you can't call private methods
[#397236] Rescue Failing in CGI Script — Doug Jolley <lists@...>
I have a Ruby 1.8.7 CGI script. Practically speaking, the whole thing
[#397255] Management of words in a string — Joao Silva <lists@...>
Hi All.
[#397268] IEEE extended precision float — Anton Hornquist <lists@...>
Hi,
[#397275] Erb templating and output buffer — "Mateusz W." <lists@...>
Hey guys,
[#397278] basic queries — John Lee <lists@...>
Consider the following code:
[#397286] Parsing a zip file for rows of string data — Jason Peterson <lists@...>
I am really new to Ruby and could use some help with a program. I need
[#397298] Re: Ruby Future in coming years — akshay jangid <lists@...>
Akshay Jangid wrote in post #1051602:
[#397328] how do I call a method with a period and pass the object before it ? — roob noob <lists@...>
like 1.to_s , except I want 8.bits_to_bytes
1.9.2p290 :011 > class Fixnum
[#397341] Find that number is repeated more and less times in an array — Joao Silva <lists@...>
Hi all.
Joao Silva wrote in post #1067849:
Brian Candler wrote in post #1067902:
[#397343] Troubled while trying to create list from hash — Panagiotis Atmatzidis <ml@...>
Hello,
[#397348] Trouble installing RubyInline — "smoothedatol412 @..." <lists@...>
I am having trouble installing RubyInline on my Mint Linix OS.
[#397367] How to Print on a single line — Kareem Adams <lists@...>
Hi there,
[#397380] Converting a .rb file to an executable — "Karan J." <lists@...>
Hi Friends,
[#397396] Lambdaification of Method Calls — Robert Klemme <shortcutter@...>
Hi,
My only request would be that you rename the method something like
[#397399] unable to use gems in simple scripts — locky thindromen <lists@...>
Hello, i'm just getting started with ruby and have hit a wall attempting
[#397408] how to create a CText Tk widget ? — "Fred L." <lists@...>
Hello all,
[#397416] learning by doing part 2 - tc game — "Sebastjan H." <lists@...>
Hi,
Hi,
Yes, that would be ok, but that means that the player has to create all
On Tue, Jul 10, 2012 at 12:39 PM, Sebastjan H. <lists@ruby-forum.com> wrote:
"Jes=C3=BAs Gabriel y Gal=C3=A1n" <jgabrielygalan@gmail.com> wrote in pos=
Jan E. wrote in post #1068109:
Sebastjan H. wrote in post #1068110:
Jan E. wrote in post #1068114:
Sebastjan H. wrote in post #1068117:
Jan E. wrote in post #1068119:
On Tue, Jul 10, 2012 at 3:18 PM, Sebastjan H. <lists@ruby-forum.com> wrote:
Thank you for the clarification. I understand the difference and I have
On 07/11/2012 08:21 AM, Sebastjan H. wrote:
As to the style:
Yeah, I actually remembered there was this strange "do-while" loop,
Jan E. wrote in post #1068984:
Sebastjan H. wrote in post #1069017:
I need (hopefully) one final help for this game:)
On Wed, Jul 18, 2012 at 2:02 PM, Sebastjan H. <lists@ruby-forum.com> wrote:
"Jes=C3=BAs Gabriel y Gal=C3=A1n" <jgabrielygalan@gmail.com> wrote in pos=
Hi,
Jan E. wrote in post #1071102:
I wanted to test this on a simple case, so I wrote the following:
[#397432] read and store definitions from an outer file — firstsense sdasad <lists@...>
Hi guys, I am a newcomer to Ruby, i got into it by having to make
[#397439] Array in an array - how to assign to individual array? — Champak Ch <lists@...>
I have 2 arrays.
[#397480] Code complexity (etc.) tools and 1.9 — Hal Fulton <rubyhacker@...>
I've just tried out reek, which is not a bad little tool... but it
[#397503] how to check string is numeric or not — Lucky Nl <lists@...>
Hi friends
On Thu, 12 Jul 2012 19:16:08 +0900
Aleksey Zapparov wrote in post #1068416:
Am 12.07.2012 21:46, schrieb Brian Candler:
[#397531] How to save an irb session including the command output to a file — XueBrian <brian.xue@...>
[#397539] method clear wiping out other array ? — Mike Onofrietto <lists@...>
Hello all,
Both variables point to the same array.
Avdi,
[#397577] Unable to use Range method for excel — agung surya <lists@...>
Hi,
[#397578] Newbie questions on the meanings of things in Ruby — "Alex S." <lists@...>
Hi,
[#397583] Gateway — Robert Klemme <shortcutter@...>
All,
[#397587] rounding to nearest even: nio gem? — Wybo Dekker <wybo@...4all.nl>
Is there a gem which makes it easy to round floats to the nearest even
[#397589] Providing a object-specific class scope? — Samuel Williams <space.ship.traveller@...>
Is it possible to do something like this with Ruby?
[#397608] undefined method error — deal bitte <lists@...>
rid.database_columns[session_db_array[0]]
[#397640] Class not found error when calling a module::class method — Carlos Araya <lists@...>
I'm working on a module to automate the creation of ebooks. When trying
[#397643] what are the C extension analogs of String#force_encoding and String#encode? — Nathan Beyer <nbeyer@...>
Within C extension code, what are the appropriate C functions to use
[#397650] JSON.parse string — Torsten Robitzki <lists@...>
Hello,
[#397655] Is there some seach algorithm available — deal bitte <lists@...>
excel_value = "Deal Bitte"
[#397665] How to replace plain strings? — Albert Schlef <lists@...>
I'm executing the following code:
[#397671] unless if not == unless post_on_ruby_forum — roob noob <lists@...>
So everything I have thus far read and heard about the Ruby unless
It's most useful for perl-esque one-liners:
[#397682] ruby library for wget — "Alan S." <lists@...>
Is there a ruby library for wget ? I searched on google but couldn't
[#397685] odd "system" command behaviour with CUI and GUI — Joel Pearson <lists@...>
Windows 7 64-bit, Ruby 1.9.3.
It works for me on Win XP. What is the return value of #system call?
Bartosz Dziewo=C5=84ski wrote in post #1069474:
Joel Pearson wrote in post #1069476:
Joel Pearson wrote in post #1069477:
Joel Pearson wrote in post #1069478:
[#397707] Homebrew iProblem — Ja Tse <lists@...>
Can anyone tell me what's going on here ? I have reinstalled xCode and
[#397735] start Learning ruby — Dha Josh <lists@...>
Hello Experts,
[#397738] Help a blind man getting ruby to work — "Morten T." <lists@...>
Hallo,
On Mon, Jul 23, 2012 at 2:23 AM, Morten T. <lists@ruby-forum.com> wrote:
Hallo,
[#397740] Re: Anyone interested in a Package Manager in Ruby? — Thomas Sawyer <lists@...>
I just came across this thread, as old as it is, I'd like to contribute.
[#397746] Ocra just stopped working with webdriver — Joel Pearson <lists@...>
This code functions fine from a script, but when I try to package it
[#397755] Re: [ruby-cvs:43685] luislavena:r36509 (trunk): Fix raw UTF-8 test for non-Japanase Windows systems — Eric Hodel <drbrain@...7.net>
[#397757] newbie question: can I run and learn Ruby on a not so powerful machine? — Rezwanur Chy <lists@...>
can I work on Ruby and RoR on my 1 GB RAM, 1.66 Ghz netbook? OS: Ubuntu
[#397775] rubyzip gem overwrites write-protected root-owned file — Wybo Dekker <wybo@...4all.nl>
I'm playing with the rubyzip gem, and found, with this little script:
Am 24.07.2012 14:44, schrieb Wybo Dekker:
On 2012-07-24 16:44, Quintus wrote:
On Thu, Jul 26, 2012 at 07:21:19PM +0900, Wybo Dekker wrote:
[#397777] What is Rex in Ruby — Parvez Shaikh <lists@...>
What is Rex in Ruby...I am a newbie to Ruby...and require a basic info
[#397806] Help with exercise from Chris Pine's Ruby Book: Sort without using .sort — "James H." <lists@...>
Hello all, I'm a n00b that's just getting into programming.
Your method is of course correct. But you don't really use the
Hi,
[#397808] String interpolation / hash of local variables — Gerbeck Shark <lists@...>
Hello all-
[#397817] modular exponentation with multiple exponents? — roob noob <lists@...>
I need to do a^b^c^d^e mod f
*lol*
[#397844] optparse problem grabbing a value — James Harrison <jam@...>
Hi folks,
[#397858] Looking for Cli like with auto-completion of options. — Eliezer Croitoru <eliezer@...>
I want to write some basic cisco like Cli.
[#397862] writing ruby simple restaurant finder — Ruby Sea <lists@...>
Hello,
[#397868] db2_connect on ruby 1.8.5 rubygems 1.3.5 — Emil Enem誡ke <eme@...>
Hi,
IMHO upgrading to a more current Ruby is your best bet
I know it would be best to upgrade to latest version of Ruby, but since =
It is probably still trying to install the latest version of
[#397889] Ruby Project with SOAP Protocol — "Daniel R." <lists@...>
Hello world,
[#397903] How to test whether a session variable has a particular key — Doug Jolley <lists@...>
Although a session variable behaves like a hash for purposes of setting
Doug Jolley wrote in post #1070696:
> are you asking a question about Rails?
Doug Jolley wrote in post #1070702:
> Anyway, if you can avoid storing nil values, then I'd just use
[#397906] Supporting multiple versions of an API — Intransition <transfire@...>
Any recommendations on the management of API versions. I have a case in
On 31 July 2012 07:54, Intransition <transfire@gmail.com> wrote:
[#397916] rubeque: Unidentified X Object — Jingjing Duan <lists@...>
Couldn't figure out how to solve this puzzle. Anyone?
[#397918] String Handling in Ruby — Tridib Bandopadhyay <lists@...>
Hello all,
[#397924] working with large binary strings? — bob hope <lists@...>
I need to work with multiple large binary strings, and to do XOR
ANN: Sequel 3.37.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, DataObjects,
DB2, DBI, Firebird, IBM_DB, Informix, JDBC, MySQL, Mysql2, ODBC,
OpenBase, Oracle, PostgreSQL, SQLite3, Swift, and TinyTDS.
Sequel 3.37.0 has been released and should be available on the gem
mirrors.
= New Features
* Database#extension and Dataset#extension have been added and
make it much easier to use extensions that just define modules,
where you previously had to manually extend a Database or
Dataset object with the module to get the extension's behavior.
These methods operate similarly to model plugins, where you just
specify the extension symbol, except that you can specify multiple
extensions at once:
DB.extension(:pg_array, :pg_hstore)
For databases, these modify the Database itself (and
potentially all of its datasets). Dataset#extension operates
like other dataset methods, returning a modified clone of
the dataset with the extension added:
dataset = dataset.extension(:columns_introspection)
Dataset#extension! has also been added for modifying the
receiver instead of returning a clone.
Not all extensions are usable by Database#extension or
Dataset#extension, the extension has to have specific support
for it. The following extensions support both
Database#extension and Dataset#extension:
* columns_introspection
* query_literals
* split_array_nil
The following extensions support just Database#extension:
* arbitrary_servers
* looser_typecasting
* pg_array
* pg_auto_parameterize
* pg_hstore
* pg_inet
* pg_interval
* pg_json
* pg_range
* pg_statement_cache
* server_block
Any user that was loading these extensions with Sequel.extension
and then manually extending objects with the extension's module
is encouraged to switch to Database#extension and/or
Dataset#extension.
* Dataset join methods now respect a :qualify=>:deep option
to do deep qualification of expressions, allowing qualification
of subexpressions in the expression tree. This can allow you
to do things like:
DB[:a].join(:b, {:c.cast(Integer)=>:d.cast(Integer)},
:qualify=>:deep)
# SELECT * FROM a INNER JOIN b
# ON (CAST(b.c AS INTEGER) = CAST(a.d AS INTEGER))
For backwards compatibility, by default Sequel will only do
automatic qualification if the arguments are simple symbols.
This may change in a future version, if automatic qualification
of only symbols is desired, switch to using :qualify=>:symbol.
You can also choose to do no automatic qualification using the
:qualify=>false option.
* All of Sequel's model associations now work with key expressions
that are not simple column references, without creating a fully
custom association. So you can create associations where the
primary/foreign key values are stored in PostgreSQL array or
hstore columns, for example.
* The pg_array extension has now been made more generic, so that it
is easy to support array types for any scalar type that is
currently supported. All scalar types that Sequel's postgres
adapter supports now have corresponding array types supported in
the pg_array extension. So if you load the pg_array extension and
return a date array column, the returned values will be arrays of
ruby Date objects.
Other pg_* extensions that add support for PostgreSQL-specific
scalar types now support array versions of those types if the
pg_array extension is loaded first.
* A pg_range extension has been added, making it easy to deal
with PostgreSQL 9.2+'s range types. As ruby's Range class does
not support all PostgreSQL range type values (such as empty ranges,
unbounded ranges, or ranges with an exlusive beginning), range
types are returned as instances of Sequel::Postgres::PGRange, which
has an API similar to Range. You can turn a PGRange into a Range
using PGRange#to_range, assuming that the range type value does not
use features that are incompatible with ruby's Range class.
The pg_range extension supports all range types supported by
default in PostgreSQL 9.2, and makes it easy to support custom
range types.
* A pg_range_ops extension has been added, which adds DSL support for
PostgreSQL range operators and functions, similar to the
pg_array_ops and pg_hstore_ops extensions.
* A pg_interval extension has been added, which makes Sequel return
PostgreSQL interval types as instances of ActiveSupport::Duration.
This is useful if you want to take the interval value and use it in
calculations in ruby (assuming you load the appropriate parts of
ActiveSupport).
* A split_array_nil extension has been added, which changes how Sequel
compiles IN/NOT IN expressions with arrays with nil values.
where(:col=>[1, nil])
# Default:
# WHERE (col IN (1, NULL))
# with split_array_nil extension:
# WHERE ((col IN (1)) OR (col IS NULL))
exclude(:col=>[1, nil])
# Default:
# WHERE (col NOT IN (1, NULL))
# with split_array_nil extension:
# WHERE ((col NOT IN (1)) AND (col IS NOT NULL))
* The nested_attributes plugin now allows the :fields option to
be a proc, which is called with the associated object and should
return an array of allowable fields.
* You can now specify the graph alias base when using eager_graph on
a per-call basis. Previously, it could only be set on a per
association basis. This is helpful if you have multiple
associations to the same class, and are cascading the eager graph to
dependent associations of that class for both of the associations.
Previously, there was no way to manually give descriptive names to
the tables in the cascaded associations, but you can now do so
by passing the association as an Sequel::SQL::AliasedExpression
instance instead of a plain Symbol. Here's a usage example:
ds = Game.eager_graph(:winner=>:players.as(:winning_players),
:loser=>:players.as(:losing_players)).
where(:winning_players__name=>'A',
:losing_players__name=>'B')
* many_through_many associations now differentiate between column
references and method references, by supporting the
:left_primary_key_column and :right_primary_key_method options that
many_to_many associations support.
* Custom :eager_loader procs that accept a single hash argument now
have an additional entry passed in the hash, :id_map, which is
easier to use than the :key_hash entry (which is still present for
backwards compatibility). Anyone with custom :eager_loader procs is
encouraged to switch from using :key_hash to :id_map.
* You can now override the create_table/alter_table schema generators
per database/adapter. This allows for database specific generator
subclasses, which have methods for unique features for that
database.
* You can now setup exclusion constraints on PostgreSQL using the
create_table and alter_table schema generators:
DB.create_table(:t) do
...
exclusion_constraint([[:col1, '&&'], [:col2, '=']])
# EXCLUDE USING gist (col1 WITH &&, col2 WITH =)
end
One common use for exclusion constraints is to make sure that no two
rows have overlapping values/ranges/circles.
* When adding foreign key constraints to an existing table on
PostgreSQL, you can use the :not_valid option to mark the constraint
as not yet valid. This will make it so that future changes to the
table need to respect the foreign key constraint, but existing rows
do not. After cleaning up the existing data, you can then use the
alter_table validate_constraint method to mark the constraint as
valid.
* An eval_inspect extension has been added that attempts to do
do the following for Sequel::SQL::Expression instances:
eval(obj.inspect) == obj # => true
There are a lot of cases that this extension does not handle, but
it does a decent job in most cases. This is currently only used
internally in a specific case in the schema_dumper extension.
= Other Improvements
* The filter by associations support now respects the method
reference vs column reference distinction that other parts of the
association code have respected since 3.32.0.
* In the nested_attributes plugin, new one_to_one associated
values are saved once instead of twice. Previously it attempted to
save them before they were associated to the current model object,
which can violate some validations/constraints.
* When saving an associated object in the one_to_one association
setter method, Sequel no longer adds an unnecessary filter
condition when nullifying the foreign key for existing rows
in the associated table.
* The list plugin's before_create method now calls super, which
fixes usage when other plugins that define before_create are loaded
before it.
* In the pg_array extension, when typecasting an Array to PGArray,
a recursive map is done on the input array to convert each value
in the input array to the expected type, using the typecasting
method that would be used for the scalar value. For example, for
model objects, where ids is an integer array column:
model.set(:ids=>['1', '2']).ids.to_a # => [1, 2]
* The pg_array extension now correctly handles bytea arrays used
in bound variables.
* The pg_array extension no longer uses the JSON-based parser for
floating point types, since it doesn't handle NaN and Infinity
values correctly.
* When typecasting in the pg_array extension, PGArray values are
only returned verbatim if they have a matching database type.
Otherwise, the underlying array is rewrapped in a new PGArray
value with the correct database type.
* H2 clob types are now recognized as strings instead of blobs.
Previously the code attempted to do this, but it didn't do so
correctly.
* The jdbc/postgres adapter now converts scalar values of
the array to the appropriate type. Previously, if you retrieved
a date array, you got back a ruby array of JavaSQL::SQL::Date
instances. Now, you get back a ruby array of ruby Date instances.
* The schema_dumper extension now dumps migrations as change
migrations, instead of separate up/down migrations, resulting in
simpler code.
* When dumping non-integer foreign keys in the schema dumper, an
explicit type is now used. Previously, the column would have been
dumped as an integer column.
* When dumping unsigned integer columns in the schema dumper, add a
column > 0 constraint in the dumped migration.
* On Microsoft SQL Server, when updating a dataset with a limit,
the limit is now respected.
* When emulating offset using the ROW_NUMBER window function,
do not require that the dataset be ordered. If an order is
not provided, default to ordering on all of the columns in
the dataset. If you want to override the default order used
in such a case, you need to override the default_offset_order
method for the dataset.
* On SQLite, casting to Date/Time/DateTime now calls an SQLite
date/datetime function instead of using a cast, as SQLite treats
such a cast as a cast to integer.
* When using JRuby 1.6 in ruby 1.9 mode and typecasting a time
column, workaround a bug where Time#nsec is 0 even though
Time#usec is not.
* The odbc/mssql adapter now correctly handles the case where
SCOPE_IDENTITY returns NULL after an insert.
* bin/sequel now accepts multiple -l options for logging to multiple
output files.
* In addition to Sequel's rigorous pre-push testing, Sequel now
also uses TravisCI for continuous integration testing across
a wider range of ruby implementations.
= Backwards Compatibility
* The keys in the :key_hash entry passed to the :eager_loader proc
are now method references instead of column references. For most
associations, they are the same thing, but for associations using
the :key_column/:primary_key_column/:left_primary_key_column
options, the values could be different. If you were using one
of those options and had a custom eager_loader, you should switch
from indexing into the :key_hash option to just using the :id_map
option.
* The :key_hash entry passed to the :eager_loader proc is now no
longer guaranteed to contain key maps for associations other than
the one currently being eagerly loaded. Previously, it contained
key maps for all associations that were being eagerly loaded. If
you have a custom :eager_loader proc that accessed a key map for
a separate association that was being loaded concurrently, you'll
now have to build the key map manually if it doesn't exist.
* If you previously explicitly specified an :eager_loader_key option
when defining an association, you may need to change it so that it
is a method reference instead of a column reference, or possibly
just omit the option.
* If you have a custom :eager_loader proc for an association where
the default :eager_loader_key option references a method that
the model does not respond to (or raises an exception), you may
need to specify the :eager_loader_key=>nil option.
* In the pg_auto_parameterize extension, String values are no longer
automatically casted to text. This is because the default type of
a string literal in PostgreSQL is unknown, not text. This makes it
much less likely to require manual casts, but has the potential to
break existing code relying on the automatic cast to text. As a
work around, any query that can no longer be automatically
parameterized after this query just needs to add manual casting
to text.
* Sequel now raises an exception if you attempt to clone associations
with different types, except if one type is one_to_many and the
other is one_to_one. Cloning from other types was usually a bug,
and raising an exception early will make it much easier to track
such bugs down.
* When running the plugin/extension and PostgreSQL adapter specs,
a json library is now required.
* The json/postgres adapter array typecasting internals have been
modified, if you were relying on the internals, you may need to
update your code.
* The pg_array extension internals changed significantly. PGArray
no longer has any subclasses by default, as parsing is now done
in separate objects. Anyone relying on the pg_array internals
will need to update their code.
* The postgres adapter no longer sets up type conversion of int2vector
and money types, since in both cases the conversion was incorrect in
most cases. These types will now be returned as strings. If you are
relying on the conversion, you'll need to add your own custom type
procs.
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/.