Skip to content

Instantly share code, notes, and snippets.

@BanzaiMan
Created June 4, 2011 23:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BanzaiMan/1008483 to your computer and use it in GitHub Desktop.
Save BanzaiMan/1008483 to your computer and use it in GitHub Desktop.
ruby-dev digest (43595-43626)

Being an abridged translation of ruby-dev discussion from May 28 through June 4. (Unless otherwise noted, the times are in JST.)

Disclaimer: These snippets are offered in the hope that someone might find them useful. I am not familiar with the C code base. These may contain inaccuracies. While I attempt to minimize them, you should not hold me accountable in any manner whatsoever.

The original posts are found at:

http://blade.nagaokaut.ac.jp/ruby/ruby-dev/43401-43600.shtml

http://blade.nagaokaut.ac.jp/ruby/ruby-dev/43601-43800.shtml

You may also find http://ruby-dev.route477.net/ useful.

43595, 43597, 43598

Re: http://redmine.ruby-lang.org/issues/3375

--disable-libedit flag is meant to disable linking with libedit, but r31265 has an error.

43596

http://redmine.ruby-lang.org/issues/show/3835 (r29631) introduced a regression in code such as https://github.com/ioquatix/rubydns/blob/master/lib/rubydns/resolv.rb resolv.rb refactoring is proposed.

43599

Re: http://redmine.ruby-lang.org/issues/4524

Re: http://github.com/shyouhei/ruby/pull/4

There are platforms which don't have LOG_PERROR. The patch is applied in r31793 and the pull request is closed.

43600,43602

Re: http://redmine.ruby-lang.org/issues/4348

r30727 and r30731 have been backported to the 1.9.2 branch.

43601

Re: http://redmine.ruby-lang.org/issues/4125

The ticket is closed again by Yugui. She rejects backporting r30118 to the 1.9.2 branch.

43603

Re: http://redmine.ruby-lang.org/issues/4804

IO.pipe generates an IO object with DEFAULT_TEXTMODE, for which Windows sets FMODE_TEXTMODE. As a result, newline character conversion is not performed.

This leads to a failure in test/test_open3.rb. It is also suspected that 2 errors in rdoc tests.

It is fixed by r31872.

43604, 43605

in English

43606, 43608, 43611, 43613, 43619

Re: http://redmine.ruby-lang.org/issues/4808

Mr. Nagai reports that some time after 1.9.2p0, thread_wait_for() began to consume ~100% CPU. (This causes Ruby/Tk similarly to do the same.) This should be considered a blocker for future releases.

Mr. Kosaki (43608, 43611): Was r31893 not enough?

Mr. Nagai (43613): The original problem was fixed with r31893, but the CPU consumption seemed still high. The attached patch reduced the CPU consumption tenfold.

Mr. Kosaki (43619): That is a great improvement.

43607, 43609

If GEM_HOME is set, 1.9.1 errors out. r25392 is reported to fix the problem.

43610, 43612, 43613, 43614, 43615, 43616, 43617, 43618, 43621, 43622

Perhaps it is convenient to have Kernel#require accept an array. (This was a discussion in ruby-list.)

Some points are raised:

  • It would save a few keystroke.
  • You can visually "group" require's.
  • Thread safety should be considered if the require's are executed in parallel.
  • Even if require's can be executed in parallel, it is a different problem entirely to encourage it as a best practice.
  • Perhaps it is convenient to allow glob patterns to 'require'.

As a side note, autoload is discussed. It is a well-known problem that autoload is not thread-safe, though it is still widely used by popular libraries, including Rails.

Mr. Urabe reports that he had talked with Mr. Yehuda Katz that it is no longer the default (43615). He also maintains that he generally discouraged the use of autoload.

Mr. Nagai (43617) objects to the implied demise of autoload, as it is critical to the maintenance of Ruby/Tk.

Mr. Urabe reiterates his position regarding the issue surrounding autoload in 43618. Ed. If anyone is interested in the details, let me know.

Mr. Eguchi wonders whether glob patterns should be promoted to a first- class Class. (43622)

43620, 43623, 43625

r31873 introduced Module#mix, but there are some questions.

Matz has no qualms about the introduction, but feels that the implementation still needs further discussions.

Under the current implementation, it is possible to use Module#mix and Module#include simultaneously, and under some cases (43620) the method lookup fails.

Can we get away with assigning different names when methods are introduced via Module#mix? This also leads to problems, and further considerations are in order.

Mr. Chikanaga (43623) also maintains that currently Module#mix does not copy constants. This is a serious problem that forces users of the library to know too much internals of the said library. Name collisions are also a problem.

Mr. Koskai (43625) objects to not having discussed in ruby-core. Shouldn't we push the introduction to 1.9.4 (or even 2.0)?

43624, 43626

Re: http://redmine.ruby-lang.org/issues/4826

Recent changes in Date introduced the following regressions.

Mr. Funaba rebuts: Errors 6-12 contain edge cases in calendar changes. We now warn and ignore them. Error 13 is an error on RubySpec's part; it should not expect BigDecimal::FloatDomainError at all; the internal conversion method changed, so the spec should be ignorant of that fact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment