Issue #4239 has been updated by Charles Nutter.


I cannot comment on C Ruby 1.9.2 behavior. I also can't comment on the pg gem, since we don't use it for JRuby.

On JRuby, Hash is insertion-ordered. This is the same for 1.8 and 1.9 modes, on any platform, on any JVM.

JRuby does not use the pg gem because C extensions impose too many limitations on JRuby deployment. Postgresql is accessed via JDBC when running on JRuby. I can't comment on whether it would work better for your particular scenario.

My comments were intended only to clarify that I believe insertion-ordered Hash has become the standard for Ruby. I don't see why that should change because one extension is buggy and depends on an old (arbitrary) Hash ordering.

The options for Zeno seem fairly clear to me:

* Fix the issues in the pg and dbi libraries. Just because hashes are ordered and insertion is disallowed during iteration doesn't mean Ruby is wrong.
* Use something else and see if it works. There's a JRuby version of dbi you could try to use, or JRuby + JDBC directly. I'm sure there are other options for MRI a well.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/4239

----------------------------------------
http://redmine.ruby-lang.org