[#390749] Why are there so many similar/identical methods in core classes — Kassym Dorsel <k.dorsel@...>

Let's look at the Array class and start with method aliases.

14 messages 2011/12/02

[#390755] Inverse Operation of Module#include — Su Zhang <su.comp.lang.ruby@...>

Hi list,

21 messages 2011/12/02
[#390759] Re: Inverse Operation of Module#include — Ryan Davis <ryand-ruby@...> 2011/12/02

[#390764] Re: Inverse Operation of Module#include — Isaac Sanders <isaacbfsanders@...> 2011/12/02

I would suggest an Adapter pattern use here. IF there is something that has

[#390876] black magical hash element vivification — Chad Perrin <code@...>

Ruby (1.9.3p0 to be precise, installed with RVM) is not behaving as I

12 messages 2011/12/05

[#390918] WEB SURVEY about Ruby Community — Intransition <transfire@...>

Did any one else get this survey request?

14 messages 2011/12/07

[#390976] Confusing results from string multiplication — Rob Marshall <robmarshall@...>

Hi,

19 messages 2011/12/08

[#391019] How can I do h["foo"] += "bar" if h["foo"] does not exist? — "Andrew S." <andrewinfosec@...>

Hi there,

13 messages 2011/12/09

[#391027] reading from file without end-of-lines — Janko Muzykant <umrzykus@...>

hi,

20 messages 2011/12/09
[#391028] Re: reading from file without end-of-lines — Gavin Sinclair <gsinclair@...> 2011/12/09

> i'm trying to read a few text values from single file:

[#391031] Re: reading from file without end-of-lines — Robert Klemme <shortcutter@...> 2011/12/09

On Fri, Dec 9, 2011 at 9:58 AM, Gavin Sinclair <gsinclair@gmail.com> wrote:

[#391042] Re: reading from file without end-of-lines — Gavin Sinclair <gsinclair@...> 2011/12/09

On Fri, Dec 9, 2011 at 8:18 PM, Robert Klemme

[#391135] I need advice on what to do next. — Nathan Kossaeth <system_freak_2004@...>

I am new to programming. I read the ebook "Learn to Program" by Chris

23 messages 2011/12/12

[#391216] perf optimization using profile results — Chuck Remes <cremes.devlist@...>

I need some help with optimizing a set of libraries that I use. They are ffi-rzmq, zmqmachine and rzmq_brokers (all up on github).

13 messages 2011/12/13
[#391218] Re: perf optimization using profile results — Chuck Remes <cremes.devlist@...> 2011/12/13

On Dec 13, 2011, at 9:57 AM, Chuck Remes wrote:

[#391234] Re: perf optimization using profile results — Charles Oliver Nutter <headius@...> 2011/12/14

A couple quick observations.

[#391238] Re: perf optimization using profile results — Chuck Remes <cremes.devlist@...> 2011/12/14

On Dec 13, 2011, at 7:03 PM, Charles Oliver Nutter wrote:

[#391324] ruby 1.9 threading performance goes non-linear — Joel VanderWerf <joelvanderwerf@...>

12 messages 2011/12/16
[#391325] Re: ruby 1.9 threading performance goes non-linear — Eric Wong <normalperson@...> 2011/12/16

Joel VanderWerf <joelvanderwerf@gmail.com> wrote:

[#391420] Accessing class instance variables from an instance? — "Shareef J." <shareef@...>

Hi there,

26 messages 2011/12/20
[#391454] Re: Accessing class instance variables from an instance? — Khat Harr <myphatproxy@...> 2011/12/21

Actually, now that I'm thinking about it the existing behavior sort of

[#391456] Re: Accessing class instance variables from an instance? — Josh Cheek <josh.cheek@...> 2011/12/21

On Tue, Dec 20, 2011 at 9:42 PM, Khat Harr <myphatproxy@hotmail.com> wrote:

[#391545] Kernel#exit raises an exception? — Khat Harr <myphatproxy@...>

While I was working on embedding an interpreter I wrote a function to

13 messages 2011/12/24

[#391618] rvmsh: An easy installer for RVM — Bryan Dunsmore <dunsmoreb@...>

I have recently begun work on a project called [rvmsh]

12 messages 2011/12/29

[#391783] Mailspam — Gunther Diemant <g.diemant@...>

Is there a way to stop this mailspam of Luca (Mail)?

12 messages 2011/12/29

[#391790] What’s the standard way of implementing #hash for value objects in Ruby? — Nikolai Weibull <now@...>

Hi!

23 messages 2011/12/29
[#391792] Re: What’s the standard way of implementing #hash for value objects in Ruby? — Gunther Diemant <g.diemant@...> 2011/12/29

I think you can't access instance variables from a class method, so

[#391793] Re: What’s the standard way of implementing #hash for value objects in Ruby? — Nikolai Weibull <now@...> 2011/12/29

On Thu, Dec 29, 2011 at 15:52, Gunther Diemant <g.diemant@gmx.net> wrote:

[#391811] Re: What’s the standard way of implementing #hash for value objects in Ruby? — Robert Klemme <shortcutter@...> 2011/12/29

On Thu, Dec 29, 2011 at 4:06 PM, Nikolai Weibull <now@bitwi.se> wrote:

[#391812] Re: What’s the standard way of implementing #hash for value objects in Ruby? — Nikolai Weibull <now@...> 2011/12/29

On Fri, Dec 30, 2011 at 00:26, Robert Klemme <shortcutter@googlemail.com> w=

[#391816] Re: What’s the standard way of implementing #hash for value objects in Ruby? — Josh Cheek <josh.cheek@...> 2011/12/30

On Thu, Dec 29, 2011 at 5:47 PM, Nikolai Weibull <now@bitwi.se> wrote:

[#391833] Re: What’s the standard way of implementing #hash for value objects in Ruby? — Robert Klemme <shortcutter@...> 2011/12/30

On Fri, Dec 30, 2011 at 12:47 AM, Nikolai Weibull <now@bitwi.se> wrote:

I: Sequel 3.30.0 Released

From: "Luca \(Email\)" <luca.pagano@...>
Date: 2011-12-29 06:45:34 UTC
List: ruby-talk #391656

-----Messaggio originale-----
Da: Jeremy Evans [mailto:code@jeremyevans.net]=20
Inviato: gioved=EC 1 dicembre 2011 19:36
A: ruby-talk ML
Oggetto: ANN: Sequel 3.30.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.30.0 has been released and should be available on the gem =
mirrors.

=3D Dataset Literalization Refactoring

* As warned about in the 3.29.0 release notes, dataset literalization
  has been completely refactored.  It now uses an append-only design
  which is faster in all cases, about twice as fast for large objects
  and deeply nested structures, and over two orders of magnitude
  faster in some pathological cases.

  This change should not affect applications, but may affect custom
  extensions or adapters that dealt with literalization of objects.
  Most literalization methods now have a method with an _append
  suffix that does the actual literalization, which takes the sql
  string to append to as the first argument.  If you were overriding
  a literalization method, you now probably need to override the
  _append version instead.  If you have this literalization method:

    def foo_sql(bar)
      "BAR #{literal(bar.baz)}"
    end

   You need to change the code to:

    def foo_sql_append(sql, bar)
      sql << "BAR "
      literal_append(sql, bar.baz)
    end

    def foo_sql(bar)
      sql =3D ""
      foo_sql_append(sql, bar)
      sql
    end

  If you have questions about modifying your custom adapter or
  extension, please ask on the Google Group or the IRC channel.

=3D New Features

* Model#set_server has been added to the base support (it was
  previously only in the sharding plugin), which allows you to
  set the shard on which to save/delete the model instance:

    foo1.set_server(:server_a).save
    foo2.set_server(:server_a).destroy

* Model#save now accepts a :server option that uses set_server
  to set the shard to use.  Unlike most other #save options, this
  option persists past the end of the save.  Previously, the
  :server option only affected the transaction code, it now
  affects the INSERT/UPDATE statement as well.

* When initiating a new dataset graph, any existing selected
  columns is assumed to be the columns to select for the graph from
  the current/master table.  Before, there was not a way to specify
  the columns to select from the current/master table.

* A :graph_alias_base association option has been added, which is
  used to set the base alias name to use when eager graphing.  This
  is mostly useful when cascading eager graphs to dependent
  associations, where multiple associations with the same name in
  different models are being graphed simultaneously.

* You can now specify nanoseconds and a timezone offset
  when converting a hash or array to a timestamp.  The nanoseconds
  and offset are the 7th and 8th entries in the array, and the :nanos
  and :offset entry in the hash.

* The postgres adapter now respects a :connect_timeout option if you
  are using the pg driver.

=3D Other Improvements

* Type conversion of Java to Ruby types in the JDBC adapter has been
  made much faster, as conversion method lookup is now
  O(number of columns) instead of
  O(number of columns*number of rows).

* Sequel::SQL::Blob literalization is now much faster on adapters that
  use hex encoding, by switching to String#unpack('H*').

* Database#after_commit and after_rollback now respect the :server
  option to set the server/shard to use.

* Symbol splitting (e.g. for table__column) is now slightly faster.

* All adapters now pass the dataset :limit/:offset value through
  Dataset#literal instead of using it verbatim.  Note that
  Dataset#limit already called to_i on input strings, so this isn't
  a security issue.  However, the previous code broke if you
  provided a Sequel-specific object (e.g. Sequel::SQL::Function) as
  the :limit/:offset value.

* Calling graph and eager_graph on an already graphed dataset no
  longer modifies the receiver.

* Model#set_server now correctly handles the case where @this is
  already loaded.

* Dataset#destroy for model datasets now uses the dataset's shard
  for transactions.

* When emulating offset support using ROW_NUMBER (on Microsoft SQL
  Server, DB2, and Oracle), explicitly order by the ROW_NUMBER
  result, as otherwise the results are not guaranteed to be ordered.

* Explicitly force a case insensitive collation when emulating ILIKE
  on Microsoft SQL Server.  Previously, ILIKE could be case sensitive
  on Microsoft SQL Server if case sensitive collation was the
  database default.

* Using on_duplicate_key_update with prepared statements on MySQL now
  works correctly.

* The tinytds adapter now works correctly if the
  identifier_output_method is nil.

* The plugin/extension specs were cleaned up using the mock adapter.

=3D Backwards Compatibility

* In addition to the previously mentioned dataset literalization
  changes, any custom adapters that overrode *_clause_methods
  methods need to be modified to add a method that adds the
  SELECT/UPDATE/INSERT/DELETE.  Previously, this was done by default,
  but due to common table expressions and the dataset literalization
  changes, a separate method is now needed.

* Dataset#on_duplicate_key_update_sql has been removed from the shared
  mysql adapter.

* The :columns dataset option used when inserting is no longer
  literalized in advance.

* Dataset#as_sql no longer takes an expression, it just takes the
  alias, and only adds the alias part.

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


 
 
 --
 Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f
 
 Sponsor:
 Riccione Hotel 3 stelle in centro: Pacchetto Capodanno mezza pensione, animazione bimbi, zona relax, parcheggio. Scopri l'offerta solo per oggi...
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=11982&d=29-12

In This Thread

Prev Next