Project

General

Profile

Activity

From 12/17/2010 to 12/23/2010

12/23/2010

11:52 PM Revision a0484364 (git): update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
11:46 PM Revision a041f129 (git): * process.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
11:26 PM Feature #4195: option for Socket#sendmsg
=begin
まつもと ゆきひろです

In message "Re: [ruby-dev:42873] Re: [feature:trunk] option for Socket#sendmsg"
on Thu, 23 Dec 2010 23:02:09 +0900, Tanaka Akira <akr@fsij.org> writes:

|まず、現在でも以下のように可能です。
|
|% ./ruby -rsocket -e '
|s1, ...
matz (Yukihiro Matsumoto)
11:02 PM Feature #4195: option for Socket#sendmsg
=begin
2010年12月23日21:01 Nobuyoshi Nakada <nobu@ruby-lang.org>:
>
> Socket#recvmsgは scm_rights: true を指定するだけでメインのデータだけで
> なく簡単にIOを受け取ることができますが、一方でSocket#sendmsg側には対応
> する指定ができません。以下のようなオプションを追加するのはどうでしょう
> か。
>
> s.sendmsg("foo",...
akr (Akira Tanaka)
09:43 PM Feature #4195: option for Socket#sendmsg
=begin
まつもと ゆきひろです

In message "Re: [ruby-dev:42869] [feature:trunk] option for Socket#sendmsg"
on Thu, 23 Dec 2010 21:01:19 +0900, Nobuyoshi Nakada <nobu@ruby-lang.org> writes:

|Socket#recvmsgは scm_rights: true を指定するだけでメインのデー...
matz (Yukihiro Matsumoto)
09:09 PM Feature #4195: option for Socket#sendmsg
=begin

=end
nobu (Nobuyoshi Nakada)
09:01 PM Feature #4195 (Rejected): option for Socket#sendmsg
=begin
なかだです。

Socket#recvmsgは scm_rights: true を指定するだけでメインのデータだけで
なく簡単にIOを受け取ることができますが、一方でSocket#sendmsg側には対応
する指定ができません。以下のようなオプションを追加するのはどうでしょう
か。

s.sendmsg("foo", scm_rights: STDIN)
s.sendmsg("foo", scm_rights:...
nobu (Nobuyoshi Nakada)
11:22 PM Revision 2383807c (git): * 2010-12-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
11:22 PM Revision 60188665 (git): fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e znz (Kazuhiro NISHIYAMA)
08:49 PM Bug #4185: ruby 1.9.2 p0 installation issue
=begin
Hi,

At Thu, 23 Dec 2010 16:35:52 +0900,
ravish nayak wrote in [ruby-core:33830]:
> 1) Can I get the URL link or Bug ID that you have mentioned in the
> above reply i.e "This bug has been fixed in the trunk already and
> ba...
nobu (Nobuyoshi Nakada)
04:35 PM Bug #4185: ruby 1.9.2 p0 installation issue
=begin
Hi Nobu,

Thanks for your valuable solution..

I need some information regarding above issues

1) Can I get the URL link or Bug ID that you have mentioned in the above reply i.e "This bug has been fixed in the trunk ...
ravish (ravish nayak)
10:50 AM Bug #4185 (Closed): ruby 1.9.2 p0 installation issue
=begin

=end
nobu (Nobuyoshi Nakada)
10:50 AM Bug #4185: ruby 1.9.2 p0 installation issue
=begin
Hi,

At Wed, 22 Dec 2010 21:21:17 +0900,
ravish nayak wrote in [ruby-core:33814]:
> tmk: Setting permissions on '/scratch/ravnay01/tmp_ruby_ruby_1.9.2/TOOLROOT/ruby/ruby/1.9.2/
> rhe4-x86_64'
> chmod 775 .
> find rhe4-x86_...
nobu (Nobuyoshi Nakada)
05:21 PM Feature #4043: グローバル関数current_classの提案
=begin
まつもと ゆきひろです

In message "Re: [ruby-dev:42861] Re: [Ruby 1.9-Feature#4043][Open] グローバル関数current_classの提案"
on Thu, 23 Dec 2010 12:36:51 +0900, Masaya TARUI <tarui@prx.jp> writes:

|個人的にはRubyVMって一般的過ぎてもう少し抽象的なもの、つまり
|「Rub...
matz (Yukihiro Matsumoto)
12:37 PM Feature #4043: グローバル関数current_classの提案
=begin
たるいです。

個人的にはRubyVMって一般的過ぎてもう少し抽象的なもの、つまり
「RubyのVMが持っているべき特徴」 を示すイメージなのですが、
あくまでYARVを指すことには変わりないという事ですね。

一つ、一般的な実行環境を示すモジュールを用意して幾つか要素をその中に
押し込めたい気がしますが、いまここでそれをいうのも大げさだと思うので、、

Module.current

に一票に変えておきます。


2010年...
tarui (Masaya Tarui)
04:27 PM Bug #4174: 1F1E on rdoc tests
=begin

On Dec 20, 2010, at 16:14, NARUSE, Yui wrote:

> 2010/12/21 Eric Hodel <drbrain@segment7.net>:
>> I could not rub test-all when I committed due to a drbssl/RSA error.
>
> Skip that tests like following:
> make RUBYOPT=-w...
drbrain (Eric Hodel)
03:28 PM Feature #3688: redef keyword for method redefinition in Ruby 2.0
=begin
Just to clarify, I'm not completely against the introduction of 'redef', it's just it would have to serve more a purpose than just allow access to the old implementation of a method. For example, if it became a requirement of the...
wardrop (Tom Wardrop)
03:24 PM Feature #3688: redef keyword for method redefinition in Ruby 2.0
=begin
I came on here to suggest the exact same thing. As someone relatively new to Ruby (got into about 5 months ago), I'm surprised there's no easy way of achieving this given that so many developers seem to do this. It's what makes R...
wardrop (Tom Wardrop)
03:15 PM Feature #4147: Array#sample で重みを指定したい
=begin
2010年12月22日18:01 Yoji Ojima <redmine@ruby-lang.org>:
>
> おっしゃる通り、個人的には全く気にしません。
> 気にする人たちのことを考えて仕様を検討してほしいとは思っています。

いろんなひとの思惑が重なって大きな話になっていますが、
小さい変化で済むといいですね。

将来のためには大きな話を検討したほうがいいですけど、
実際の進め方としては (可能なら) うまく分割して漸進的に
...
akr (Akira Tanaka)
03:04 PM Feature #4147: Array#sample で重みを指定したい
=begin
遠藤です。

議論が大分入り組んで来たので、一旦現在の API とその実装の案を
まとめてみました。sample_each は each_sample に改名してます。


Array#sample([size, [opt]])
- API
- size が省略されたら 1 つサンプリングして返す
- size が与えられたら size 分だけ非復元抽出して配列で返す
- opt の意味:
w...
mame (Yusuke Endoh)
02:56 PM Feature #4147: Array#sample で重みを指定したい
=begin
遠藤です。

2010年12月23日14:00 Kenta Murata <muraken@gmail.com>:
> 復元抽出が可能なようにする方法として replace キーワードが分かりにくいという
> 意見が出ていたので、成瀬さんが提案しているように choice メソッドとして
> 提供する方法が良いのではないかと。

この名前については ruby-core で議論すべきだと思います。
個人的には sample/choice の...
mame (Yusuke Endoh)
02:00 PM Feature #4147: Array#sample で重みを指定したい
=begin
むらたです。

yugui さんのおかげでこのスレに気付けました。ありがとうございます。

# Math/Random の話しが長くなったので、引用を前後させます。

On 2010/12/19, at 21:15, Yugui wrote:

> 2010/12/19 Masaya TARUI <tarui@prx.jp>:
>>> じゃあ反対ないので実装はともかく、この仕様は基本入れる方向で考えましょう。反対の人は意思表示お早めに。...
mrkn (Kenta Murata)
02:30 PM Revision 2b862ea9 (git): * common.mk, win32/Makefile.sub: fixes dependencies.
patch by nobu.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
01:31 PM Revision 859ed453 (git): * io.c (io_fillbuf): fixes a mistake on merging r30280, at r30321.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e yugui (Yuki Sonoda)
12:46 PM Revision c2e1f019 (git): merges r30295,r30298 and r30299 from trunk into ruby_1_9_2.
--
adding tests for the SMTP response parser
--
adding more tests for Net::SMTP::Response class
--
adding tests for Net::SMTP::Response#exception_class
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30324 b2dd03c8-39d4-...
yugui (Yuki Sonoda)
12:45 PM Revision 6e210138 (git): merges r30294 from trunk into ruby_1_9_2.
--
* lib/net/smtp.rb: Net::SMTP should close the SSL connection if the
connection verification fails.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
12:45 PM Revision a8b6a6f3 (git): merges r30284 from trunk into ruby_1_9_2.
--
* test/rexml/test_contrib.rb (ContribTester#test_pos): should not
use fixed path name for tests. [ruby-dev:42827]
* test/rexml/test_sax.rb (SAX2Tester#test_socket): should not use
fixed port for tests. [ruby-dev:42828]
git-svn-...
yugui (Yuki Sonoda)
12:45 PM Revision a4610bae (git): merges r30280 from trunk into ruby_1_9_2.
--
* io.c : add an extra byte to buffer for the specification of read
in Windows. see [ruby-core:33460] and r29980. and, we have to
discuss how to do this one byte.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby...
yugui (Yuki Sonoda)
12:45 PM Revision 6a1ab2d3 (git): merges r30213 from trunk into ruby_1_9_2.
--
* ext/openssl/ossl_x509ext.c (ossl_x509extfactory_set_config):
fix compile error when !HAVE_X509V3_SET_NCONF. Thanks
Chikanaga-san. [ruby-dev:42761] [Ruby 1.9-Bug#4158]
git-svn-id: svn+ssh://ci.ruby-lang.o...
yugui (Yuki Sonoda)
12:45 PM Revision 5ef68cb6 (git): merges r30169 and r30170 from trunk into ruby_1_9_2.
--
* ext/tk/lib/multi-tk.rb: infinite loop on method_missing at loading.
[ruby-dev:42716] [Ruby 1.9-Bug#4129]
* ext/tk/lib/multi-tk.rb: when no eventloop is running, ruby freezes at exit.
--
add an entry.
git-svn-id: svn+ssh://ci.rub...
yugui (Yuki Sonoda)
12:45 PM Revision d80452a1 (git): merges r30147 from trunk into ruby_1_9_2.
--
* test/irb/test_option.rb (test_end_of_option): don't read .irbrc. Bug#4138
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
12:45 PM Revision 243faf28 (git): merges r30122 from trunk into ruby_1_9_2.
--
* io.c (io_read): duplicate string if shared. [ruby-dev:42719]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
12:45 PM Revision 929bdcab (git): merges r30117 from trunk into ruby_1_9_2.
--
* lib/rexml/light/node.rb: remove circular require.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
12:45 PM Revision 1f849b54 (git): merges r30112 from trunk into ruby_1_9_2.
--
* ext/nkf/lib/kconv.rb (String#kconv): fix typo and update rdoc.
patched by Kouhei Yanagita [ruby-dev:42696]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
12:45 PM Revision 57eb3170 (git): merges r30104 from trunk into ruby_1_9_2.
--
* win32/win32.c (rb_w32_read): fixed more for readline, and so on. [ruby-core:33511]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
12:45 PM Revision 461b1452 (git): merges r30094 from trunk into ruby_1_9_2.
--
* test/ruby/test_string.rb (TestString#test_scan): add a test for
[ruby-core:33338] #4087.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
10:53 AM Bug #4182 (Rejected): Possible Ruby1.9.2/Sqlite3 bug when used with Rails 2.3.8 and TOG 0.6
=begin
You use an extension library for ruby 1.8 with ruby 1.9.
=end
nobu (Nobuyoshi Nakada)
10:49 AM Revision 7869d38b (git): merges r30304 from trunk into ruby_1_9_2.
--
* test/net/imap/cacert.pem: updated because it has been expired.
* test/net/imap/server.crt: signed again because CA cert was expired.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30312 b2dd03c8-39d4-4d8f-98ff-82...
yugui (Yuki Sonoda)
10:49 AM Revision b3ae334e (git): merges r30086 from trunk into ruby_1_9_2.
--
* class.c (make_metaclass): fix probable typo. builtin type flag
cannot be used with FL_TEST.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
10:49 AM Revision 06dc853a (git): merges r30085 from trunk into ruby_1_9_2.
--
* lib/irb/init.rb (IRB.parse_opts): fix typo. [ruby-core:33574]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
10:49 AM Revision 9afa601a (git): merges r30084 from trunk into ruby_1_9_2.
--
* ruby.c (load_file_internal): decrement for ungotten line.
[ruby-dev:42680]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
10:49 AM Revision 91c7169d (git): merges r30063 from trunk into ruby_1_9_2.
--
* ext/stringio/stringio.c (strio_getline): round upto next char
boundary. [ruby-dev:42674]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
10:49 AM Revision a46abaca (git): merges r29980,r30017,r30018,r30019 and r30020 from trunk into ruby_1_9_2.
--
* win32/win32.c (rb_w32_read): read only 1 byte at once on console.
workaround of Windows bug. see [ruby-core:33460].
this is not the final solution.
--
* win32/win32.c (rb_w32_read): workaround for console reading troubles.
fix...
yugui (Yuki Sonoda)
10:49 AM Revision c9d697ab (git): merges r29976 from trunk into ruby_1_9_2.
--
* lib/uri/common.rb (URI::WFKV_): get rid of backtrack explosion
by nested repeat operators. [ruby-core:33464]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
10:48 AM Revision f33246da (git): merges r29970 from trunk into ruby_1_9_2.
--
test/ruby/test_transcode.rb (test_unicode_public_review_issue_121):
- Removed commented-out options that are no longer under discussion.
- Added two more tests for forthcomming clarifications.
git-svn-id: svn+ssh://ci.ruby-lang.org/r...
yugui (Yuki Sonoda)
10:25 AM Revision dae189e8 (git): * test/net/imap/cacert.pem: updated because it has been expired.
* test/net/imap/server.crt: signed again because CA cert was expired.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
10:25 AM Feature #4189 (Closed): FileUtils#ln_r
=begin
I wrote a method for FileUtils to do recursive hard linking. It works just like cp_r but links instead of copies.

The code can be found along with the pull request I made to ruby/ruby on Github:

http://github.com/rub...
trans (Thomas Sawyer)
10:12 AM Bug #4188: minitest warnings in 1.9.3
=begin

On Dec 22, 2010, at 16:24 , Aaron Patterson wrote:

> Bug #4188: minitest warnings in 1.9.3
> http://redmine.ruby-lang.org/issues/show/4188
>
> Author: Aaron Patterson
> Status: Open, Priority: Normal
> Assigned to: Rya...
zenspider (Ryan Davis)
09:24 AM Bug #4188 (Closed): minitest warnings in 1.9.3
=begin
When running tests with minitests, I get warnings:

/Users/apatterson/.local/lib/ruby/1.9.1/minitest/unit.rb:631: warning: assigned but unused variable - ac
/Users/apatterson/.local/lib/ruby/1.9.1/minitest/unit.rb:632: warn...
tenderlovemaking (Aaron Patterson)
07:46 AM Bug #4187 (Closed): Error: test_starttls(IMAPTest)
=begin
test_starttls で Error になります。
IOError の方が多いのですが、何度か実行していると OpenSSL::SSL::SSLError になることもあるようです。
表面化するようになった理由は #4186 と同じ証明書の期限切れのようです。

assert がないのでエラーになった方が良いのかもしれませんが、 imap.logout と imap.disconnect の
ところに imap.disconne...
znz (Kazuhiro NISHIYAMA)
07:27 AM Bug #4186 (Closed): Failure: test_imaps_with_ca_file(IMAPTest)
=begin
証明書 (test/net/imap/cacert.pem) の期限切れでテストが失敗するようになっています。

1) Failure:
test_imaps_with_ca_file(IMAPTest) [/home/chkbuild/tmp/build/ruby-trunk/20101221T223930Z/ruby/test/net/imap/test_imap.rb:66]:
Exception raised:
<#<Op...
znz (Kazuhiro NISHIYAMA)
03:22 AM Revision 196d4a7d (git): merge revision(s) 30302:
* lib/resolv.rb (Resolv::IPv4::Regex): make it only accept 0 to 255.
[ruby-core:29501]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@30303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
shyouhei (Shyouhei Urabe)
03:12 AM Revision 5859f149 (git): merge revision(s) 27388:27390:
* lib/resolv.rb (Resolv::IPv4::Regex): make it only accept 0 to 255.
[ruby-core:29501]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@30302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
shyouhei (Shyouhei Urabe)
02:17 AM Revision 462f3626 (git): * parse.y: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
02:00 AM Revision c5a19b38 (git): * error.c (rb_check_type): check for type from extensions for ruby
1.8. see [ruby-core:33797].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)

12/22/2010

11:32 PM Revision 26e6372a (git): adding tests for Net::SMTP::Response#exception_class
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e tenderlovemaking (Aaron Patterson)
11:26 PM Revision 3971bc3c (git): adding more tests for Net::SMTP::Response class
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e tenderlovemaking (Aaron Patterson)
11:18 PM Revision d236a0ca (git): passing nil to split is not necessary
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e tenderlovemaking (Aaron Patterson)
11:13 PM Revision 0a2392a5 (git): * lib/net/smtp.rb: refactoring Net::SMTP#esmtp= to use an
attr_accessor
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
tenderlovemaking (Aaron Patterson)
11:09 PM Revision df8e7db7 (git): adding tests for the SMTP response parser
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e tenderlovemaking (Aaron Patterson)
09:37 PM Revision 4a7f4d1f (git): * lib/net/smtp.rb: Net::SMTP should close the SSL connection if the
connection verification fails.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
tenderlovemaking (Aaron Patterson)
09:19 PM Bug #4185 (Closed): ruby 1.9.2 p0 installation issue
=begin
Hi,

I am trying to install ruby 1.9.2 p0 and 1.9.2 rc2 version on redhat linux4 under x86 architecture while compiling the source code I am
getting following errors and compilation was not successfull

First one is
...
ravish (ravish nayak)
07:10 PM Bug #4121: test_getpty_nonexistentで止まることがある
=begin
誰が悪いのかはわかりませんが、以下の2つのコミットが間違っていることと、現在のtrunkだと
fork時に子プロセスがGVLを再初期化するまえにGVLをacquireするケースがあるので、forkが動くのは
ただのミラクルということが分かりました。

あと、Process#fork()以外のfork(IO#popenとか)だとrb_thread_atforkが呼ばれてないので、
消滅したスレッドの掃除もされないし、GVLも再初期化され...
kosaki (Motohiro KOSAKI)
05:09 PM Bug #4121 (Assigned): test_getpty_nonexistentで止まることがある
=begin
わたしの手には負えないかもしれないですけど、誰も手を動かしていない気配があるのでとりあえず自分にアサインします。誰か手を動かしている人がいれば遠慮なく奪ってください
=end
kosaki (Motohiro KOSAKI)
04:55 PM Bug #4121: test_getpty_nonexistentで止まることがある
=begin
うちでも起きる環境と起きない環境がありました。

起きない
RHEL ES 3.8 Kernel 2.4.21-47.ELsmp, Xeon 5160(2core) x 2CPU
Ubuntu 9.04 Kernel 2.6.28-19-generic, Pentium4 x 1CPU

起きる
RHEL ES 4.8 Kernel 2.6.9-89.ELlargesmp, Xeon X5570(2core) x ...
nagachika (Tomoyuki Chikanaga)
06:01 PM Feature #4147: Array#sample で重みを指定したい
=begin
>そして、ひとつだけ取り出すなら、復元抽出でも非復元抽出でもかわりないので、
>どちらでも気にしないんじゃないかと思っています。

おっしゃる通り、個人的には全く気にしません。
気にする人たちのことを考えて仕様を検討してほしいとは思っています。
=end
oj (Yoji Ojima)
03:29 PM Feature #4147: Array#sample で重みを指定したい
=begin
2010年12月22日13:08 Tanaka Akira <akr@fsij.org>:
> 2010年12月21日15:20 NARUSE, Yui <naruse@airemix.jp>:
>>
>> == 復元抽出の指定
>>
>> まず、今回のおみくじは復元抽出なので、復元抽出の指定を追加する必要があります。
>
> いまさらこのスレッドの最初の方を読み直したんですが、
> どっちかっていうと、 一回の呼び出しで複数取り出すこと...
naruse (Yui NARUSE)
03:23 PM Feature #4147: Array#sample で重みを指定したい
=begin
2010年12月21日17:59 Yoji Ojima <redmine@ruby-lang.org>:
>>> これなら悪くないと思います。
>>> ただ sample_each.each となると少し変なので、名前は要検討かと。
>>
>>その場合は sample_each {|x| .. } とするだろうので、変にはなりませんね。
>
> そうでしたか、失礼。
> これを採用する可能性を考えると、重みをブロックで指定する方式は整合性が...
naruse (Yui NARUSE)
01:08 PM Feature #4147: Array#sample で重みを指定したい
=begin
2010年12月21日15:20 NARUSE, Yui <naruse@airemix.jp>:
>
> == 復元抽出の指定
>
> まず、今回のおみくじは復元抽出なので、復元抽出の指定を追加する必要があります。

いまさらこのスレッドの最初の方を読み直したんですが、
どっちかっていうと、 一回の呼び出しで複数取り出すことはあまり考えていなかった
のではないか、という印象を受けます。

[ruby-dev:42735] のサンプル...
akr (Akira Tanaka)
12:34 AM Feature #4147: Array#sample で重みを指定したい
=begin
2010年12月21日21:35 Tanaka Akira <akr@fsij.org>:
>
> Pavlos S. Efraimidis, Paul G. Spirakis
> Weighted random sampling with a reservoir
> Information Processing Letters
> Volume 97, Issue 5 (16 March 2006)
>
> というアルゴリズムがあるようで...
akr (Akira Tanaka)
04:49 PM Revision 7a033184 (git): * 2010-12-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
04:49 PM Revision 1ebba08d (git): * NEWS: remove #object_id. [ruby-dev:42840]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e znz (Kazuhiro NISHIYAMA)
01:30 PM Feature #4043: グローバル関数current_classの提案
=begin
まつもと ゆきひろです

In message "Re: [ruby-dev:42850] Re: [Ruby 1.9-Feature#4043][Open] グローバル関数current_classの提案"
on Wed, 22 Dec 2010 12:57:26 +0900, Masaya TARUI <tarui@prx.jp> writes:

|ユースケースがRubyの理解という事だし、どこの所属かを考えたら
|
|Ru...
matz (Yukihiro Matsumoto)
12:57 PM Feature #4043: グローバル関数current_classの提案
=begin
たるいです。

ユースケースがRubyの理解という事だし、どこの所属かを考えたら

RubyVM.current_class

が良かったりしませんか?
候補の一つとして。

--
樽家昌也(Masaya TARUI)
No Tool,No Life.
=end
tarui (Masaya Tarui)
10:19 AM Feature #4043: グローバル関数current_classの提案
=begin
こんにちは、なかむら(う)です。

In message "[ruby-dev:42845] Re: [Ruby 1.9-Feature#4043][Open] グローバル関数current_classの提案"
on Dec.22,2010 01:35:44, <matz@ruby-lang.org> wrote:
> current_moduleという名前なのにクラスを返すこともあるというの
> はやや抵抗がありますね。current...
usa (Usaku NAKAMURA)
09:58 AM Feature #4043: グローバル関数current_classの提案
=begin
こんにちは、なかむら(う)です。

In message "[ruby-dev:42847] Re: [Ruby 1.9-Feature#4043][Open] グローバル関数current_classの提案"
on Dec.22,2010 09:37:33, <kosaki.motohiro@gmail.com> wrote:
> 個人的な経験ですが、descriptorという用語はUnixのファイルディスクリプタの
> イメージが...
usa (Usaku NAKAMURA)
09:37 AM Feature #4043: グローバル関数current_classの提案
=begin
>>current_moduleという名前なのにクラスを返すこともあるというの
>>はやや抵抗がありますね。current_classという別名を用意しても
>>良いのですが、他にアイディアはありませんかね。
>
> モデリング界では,
>
> descriptor
>
> を使っています. instance との対語として使います. インスタンスがクラス
> のインスタンスに限らないのでそのような呼び名が出てきたんだと思います.
...
kosaki (Motohiro KOSAKI)
02:51 AM Feature #4043: グローバル関数current_classの提案
=begin
けいじゅ@いしつかです.

In [ruby-dev:42845] the message: "[ruby-dev:42845] Re: [Ruby
1.9-Feature#4043][Open] グローバル関数current_classの提案", on Dec/22
01:35(JST) Yukihiro Matsumoto writes:

>まつもと ゆきひろです

>current_moduleという名前なのにクラスを返すこともあ...
keiju (Keiju Ishitsuka)
01:35 AM Feature #4043: グローバル関数current_classの提案
=begin
まつもと ゆきひろです

In message "Re: [ruby-dev:42838] Re: [Ruby 1.9-Feature#4043][Open] グローバル関数current_classの提案"
on Tue, 21 Dec 2010 17:37:16 +0900, "KISHIMOTO, Makoto" <ksmakoto@dd.iij4u.or.jp> writes:

|> その場合、Module.current_c...
matz (Yukihiro Matsumoto)
12:09 PM Bug #3787: TCPSocket.new() fails on IPv6 connections for IPV4/IPv6 hosts
=begin
Oh, sorry. You're right.

In my case, while I can connect to 1200 via v4,

% ruby -d -v -rsocket -e "p TCPSocket.new('127.0.0.1', 1200)"
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10]
#<TCPSocket:0x10018a078>
...
matsuda (Akira Matsuda)
08:51 AM Bug #3787: TCPSocket.new() fails on IPv6 connections for IPV4/IPv6 hosts
=begin
@a_matsuda: Isn't that a different situation? The original issue is that the reporter cannot connect to 'localhost', while he seems to be possible to connect to '::1'.
=end
shyouhei (Shyouhei Urabe)
12:02 PM Feature #3908 (Assigned): private constant
=begin
Hi, NaHi

> Just as a notification since I see this ticket closed today.

Kazu committed a change of NEWS with ML ref, which closed this
ticket. I think that he did not intend to close this ticket.
That is, it is jus...
mame (Yusuke Endoh)
11:22 AM Feature #3908: private constant
=begin
Hi,

Yusuke, patches in the mail I'm replying are not applied and we still
need discuss about followings, right?

- Module#constants includes a private constant?
- Module#const_get raises NameError for a private constant?
...
nahi (Hiroshi Nakamura)
09:07 AM Feature #3908 (Closed): private constant
=begin
This issue was solved with changeset r30290.
Yusuke, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end
Anonymous
10:33 AM Feature #4184: String that has the same object_id in an each occurrence in a code
=begin
Then it should be the GC to be fixed. Introducing a new syntax to cover a poor GC is just wrong.
=end
shyouhei (Shyouhei Urabe)
10:22 AM Feature #4184: String that has the same object_id in an each occurrence in a code
=begin

The cost of GC increases with the number of allocated and referenced objects. The copy-on-write internal String buffers reduces the needless copying of the String buffers, if they are likely to be dup'ed and not mutated, but ...
kstephens (Kurt Stephens)
09:27 AM Feature #4184: String that has the same object_id in an each occurrence in a code
=begin
Why to bother object_id? Strings with duplicated contents are optimized already. No memory copies happen unless they are small enough -- very cheap anyway.
=end
shyouhei (Shyouhei Urabe)
05:40 AM Feature #4184: String that has the same object_id in an each occurrence in a code
=begin


On 12/21/2010 3:01 PM, Pavel Rosputko wrote:
> Propose:
> 5.times { %c(asdasdf).object_id } -> same!
>
> Example of usefullness:
>
> a,b,c,d = data.unpack %c(ccNc) |
> e,f,g,h = a.unpack %c(cvaN) | repeated many t...
lsegal (Loren Segal)
05:01 AM Feature #4184 (Rejected): String that has the same object_id in an each occurrence in a code
=begin
Regexp literals:
5.times { p /abcdasdf/.object_id } -> same!

String literals:
5.times { 'asdasdf'.object_id } -> different

Propose:
5.times { %c(asdasdf).object_id } -> same!

Example of usefullness:

a,b,...
pavelrosputko (Pavel Rosputko)
05:38 AM Revision 049cdff0 (git): * gc.c (Init_GC): move back object_id to Kernel. [ruby-dev:42840]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e matz (Yukihiro Matsumoto)
03:15 AM Feature #4183 (Closed): [ext/openssl] Timestamp support
=begin
Hi,

I'd like to propose the attached code to support timestamp creation and verification in ext/openssl under a new module OpenSSL::Timestamp. It comes also with various tests and rDoc documentation. Since OpenSSL only supp...
MartinBosslet (Martin Bosslet)
01:14 AM Bug #4182: Possible Ruby1.9.2/Sqlite3 bug when used with Rails 2.3.8 and TOG 0.6
=begin
Same problem with MySQL, as well:

alex@laptop ~/Projects/hello_tog $ gem install mysql

alex@laptop ~/Projects/hello_tog $ script/server=> Booting WEBrick
=> Rails 2.3.8 application starting on http://0.0.0.0:3000
=>...
alexbottoni (Alessandro Bottoni)
12:18 AM Bug #4182 (Rejected): Possible Ruby1.9.2/Sqlite3 bug when used with Rails 2.3.8 and TOG 0.6
=begin
I installed RVM 1.1.6, Ruby 1.9.2, RubyGems 1.3.7 , Rails 2.3.9 and tog 0,6 (http://www.toghq.com/) on LinuxMint 10 Julia. I generated a TOG project with this command line:

rails _2.3.8_ hello_tog -m http://tr.im/tog_current...
alexbottoni (Alessandro Bottoni)

12/21/2010

11:59 PM Revision 6a50d272 (git): * NEWS: add Module#private_constant and Module#public_constant.
[ruby-dev:39685][ruby-core:32698]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
znz (Kazuhiro NISHIYAMA)
11:59 PM Revision 92413833 (git): sort and remove s
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e znz (Kazuhiro NISHIYAMA)
11:03 PM Revision ee4a024c (git): * 2010-12-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
11:03 PM Revision d5eea8c1 (git): NEWS: add IO#advise.
[ruby-core:33110] [Ruby 1.9-Feature#4038]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
znz (Kazuhiro NISHIYAMA)
10:18 PM Bug #3787: TCPSocket.new() fails on IPv6 connections for IPV4/IPv6 hosts
=begin
I just got the same error on my machine (Mac OSX 10.6) with both Ruby 1.8.7 and 1.9.2.

% ruby -d -v -rsocket -e "TCPSocket.new '::1', 1200"
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10]
Exception `Errno::ECONNRE...
matsuda (Akira Matsuda)
09:35 PM Feature #4147: Array#sample で重みを指定したい
=begin
2010年12月20日22:56 Tanaka Akira <akr@fsij.org>:

> なので、被復元抽出を効率的に実装する方法について検討が必要ですが、
> それはちょっと自明ではありません。

Pavlos S. Efraimidis, Paul G. Spirakis
Weighted random sampling with a reservoir
Information Processing Letters
Volum...
akr (Akira Tanaka)
05:58 PM Feature #4147: Array#sample で重みを指定したい
=begin
>まず、今回のおみくじは復元抽出なので、復元抽出の指定を追加する必要があります。
>optional hashで指定という論もありますが、わたしは Array#choice という名の復元抽出
>メソッド追加を推します。

賛成です。1.8.7 であったものが急に使えなくなる問題も自然と解消されますし。

>> これなら悪くないと思います。
>> ただ sample_each.each となると少し変なので、名前は要検討かと。...
oj (Yoji Ojima)
03:20 PM Feature #4147: Array#sample で重みを指定したい
=begin
今の論点は以下の三つだと思います。
* 復元抽出の指定
* 重みの指定 (引数/block)
* 効率 (ユースケースはなにか、何に対して最適化するか)

== 復元抽出の指定

まず、今回のおみくじは復元抽出なので、復元抽出の指定を追加する必要があります。
optional hashで指定という論もありますが、わたしは Array#choice という名の復元抽出
メソッド追加を推します。

Array#choice は 1.8....
naruse (Yui NARUSE)
12:36 PM Feature #4147: Array#sample で重みを指定したい
=begin
>ところで以前 naruse さんが (IRC で) 言ってたアイデアなのですが、
>Enumerator で返すという API が考えられます。つまり、
>
> e = %(大吉 中吉 小吉 凶).sample_each
> e.each {|x| p x } #=> 凶 中吉 大吉 小吉
>
> e = %(大吉 中吉 小吉 凶).sample_each(unique: false, weight: [1000, 100...
oj (Yoji Ojima)
01:33 AM Feature #4147: Array#sample で重みを指定したい
=begin
遠藤です。

2010年12月20日22:33 Yoji Ojima <redmine@ruby-lang.org>:
>>「重みを変えずに繰り返し抽選したい」というユースケースで有利になる
>>んですが、汎用性に欠けますかね。結構ありそうだと思うんですが。
>
> ほとんどの場合は一回の呼び出しで大量の抽出を行うことで代替可能ではないでしょうか。

最初に大量抽出でプールしておいて、ちょっとずつ消費し、無くなったら
また大量抽出してプ...
mame (Yusuke Endoh)
05:37 PM Feature #4043: グローバル関数current_classの提案
=begin
きしもとです

> |> そういう機能の追加には賛成しますが、グローバル関数は増やした
> |> くありません。どうするのがよいでしょうね。
> |
> |さがしてみたところ、Module の特異メソッドに、レシーバとは関係ない、
> |現在のコンテキストについて動作するものがありました。
> |
> |なので、Module の特異メソッドではどうでしょうか?
>
> その場合、Module.current_class という名前に...
metanest (Makoto Kishimoto)
11:53 AM Feature #4043: グローバル関数current_classの提案
=begin
まつもと ゆきひろです

In message "Re: [ruby-dev:42834] Re: [Ruby 1.9-Feature#4043][Open] グローバル関数current_classの提案"
on Tue, 21 Dec 2010 11:21:32 +0900, "KISHIMOTO, Makoto" <ksmakoto@dd.iij4u.or.jp> writes:

|> そういう機能の追加には賛成しますが、グロー...
matz (Yukihiro Matsumoto)
11:21 AM Feature #4043: グローバル関数current_classの提案
=begin
きしもとです

> |カレントクラス(MRIの内部でいうところのcref)をRubyから調べられるメソッドcurrent_classを提案します。
> |グローバル関数(Kernelのプライベートメソッド)にする理由は、self(ないしなんらかのオブジェクト)とは関係ない値を返すメソッドであるため、です。
>
> そういう機能の追加には賛成しますが、グローバル関数は増やした
> くありません。どうするのがよいでしょうね。

さがしてみた...
metanest (Makoto Kishimoto)
10:34 AM Feature #4180 (Closed): Add Zlib.deflate / Zlib.inflate
=begin
Zlib::Deflate.deflate ってムダに長いと思いんです。
Rails 的な言葉で言うと、DRY じゃないと言いますか。
Zlib.deflate でいいんじゃないかと。

同様に、Zlib::Inflate.inflate も Zlib.inflate でいいのではないでしょうか。
=end
naruse (Yui NARUSE)
09:14 AM Bug #4174: 1F1E on rdoc tests
=begin
2010/12/21 Eric Hodel <drbrain@segment7.net>:
> I could not rub test-all when I committed due to a drbssl/RSA error.

Skip that tests like following:
make RUBYOPT=-w TESTS='-v -n"/\A(?!test_getpty_nonexistent)/"'
TMPDIR=/tmp...
naruse (Yui NARUSE)
05:52 AM Bug #4174: 1F1E on rdoc tests
=begin
On Dec 20, 2010, at 3:57, Kouhei Yanagita <redmine@ruby-lang.org> wrote:

> Bug #4174: 1F1E on rdoc tests
> http://redmine.ruby-lang.org/issues/show/4174
>
> Author: Kouhei Yanagita
> Status: Open, Priority: Normal
> ruby...
drbrain (Eric Hodel)
08:55 AM Bug #4179: OpenStruct#method_missing handles #[]= wrongly
=begin
On 20 Dec 2010, at 23:43, Caius Durling wrote:

> Bug #4179: OpenStruct#method_missing handles #[]= wrongly
> http://redmine.ruby-lang.org/issues/show/4179

Erm, not quite sure why reloading the redmine page triggered anothe...
caius (Caius Durling)
08:40 AM Bug #4179 (Closed): OpenStruct#method_missing handles #[]= wrongly
=begin
## Code to reproduce:

require "ostruct"
OpenStruct.new[:foo] = true

## Expected

`NoMethodError` to be raised, as `OpenStruct#[]=` is not a defined method.

## Actual

`wrong number of arguments (...
caius (Caius Durling)
08:39 AM Bug #4178 (Closed): test/rubygems/gemutilities.rb で、よくわからない ArgumentError
=begin
(bisectによれば)trunk の r29064 以降、test-all でたまに発生しているのですが、
(たとえば http://mrkn.jp/chkbuild/ruby-trunk/log/20100925T163004Z.diff.html.gz
<n>) Error:
+test_install_ignore_dependencies(TestGemDependencyInstaller):
+ArgumentError...
metanest (Makoto Kishimoto)
06:27 AM Bug #4177 (Closed): wrong fixed value at test/rexml/test_sax.rb(test_socket)
=begin
This issue was solved with changeset r30284.
Masaya, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end
nobu (Nobuyoshi Nakada)
01:10 AM Bug #4177 (Closed): wrong fixed value at test/rexml/test_sax.rb(test_socket)
=begin
test/rexml/test_sax.rb の test_socketでportが12345番固定でテストされているため、
12345番が使用されている時にerrorになります。
テスト内容を見るに固定する必要はなさそうなので普通にシステムに割り振ってもらえばいいと思います。

#とあるアンチウィルスソフトがこのポートを占拠していたりします。
=end
tarui (Masaya Tarui)
06:27 AM Bug #4176 (Closed): wrong fixed value at test_contrib.rb(test_pos)
=begin
This issue was solved with changeset r30284.
Masaya, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end
nobu (Nobuyoshi Nakada)
01:02 AM Bug #4176 (Closed): wrong fixed value at test_contrib.rb(test_pos)
=begin
test/rexml/test_contrib.rbのtest_posでtestfileが/tmpの存在を仮定してますが、
Tempfileを使うべきだと思います。


#windowsでは標準では/tmpがないのでerrorになります。
=end
tarui (Masaya Tarui)
03:45 AM Revision 12329a58 (git): * configure.in (target_archs): remove temporary objects.
* enc/Makefile.in, enc/depend (clean): remove work directories.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
03:10 AM Feature #4168: WeakRef is unsafe to use in Ruby 1.9
=begin
JRuby already maps WeakRef to the native JVM construct. In addition, the "weakling" gem provides reference queues and a simple weak ID hash based on them. Weak references without reference queues are much more difficult to use, s...
headius (Charles Nutter)
02:54 AM Bug #4149: Documentation submission: syslog standard library
=begin
I am (definitely) attaching an updated documentation patch with call-seq: directives, since they now work in RDoc 2.0.1.
=end
meta (mathew murphy)
01:14 AM Feature #4172: Named arguments/parameters support
=begin
Great! Is there any place I can see the spec?

Thank you and best regards!

Rodrigo
=end
rosenfeld (Rodrigo Rosenfeld Rosas)
12:17 AM Bug #4169 (Closed): Forked processes locked, won't exit
=begin
This issue was solved with changeset r30272.
Ilya, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end
kosaki (Motohiro KOSAKI)

12/20/2010

11:09 PM Feature #3647: Array#sample(n, replace=false)
2010年12月19日23:22 Yusuke ENDOH <mame@tsg.ne.jp>:
> 入れるとしたら `sample(何かキーワード: true)` だと思うんですが、
> ...
`unique` とか。
現在の挙動 (非復元抽出) が `unique: true` で。
`unique: false` とすると復元抽出。
(`uniq` でも)
--
[田中 哲][たなか あきら][Tanaka Akira]
akr (Akira Tanaka)
10:56 PM Feature #4147: Array#sample で重みを指定したい
=begin
2010年12月19日21:15 Yugui <yugui@yugui.jp>:

> * 効率的な実装の可能な仕様であるべきです。

もしこの話が復元抽出 (同じものが何回でも現れても良い)の話なら、
それを効率的に実装する乱数は、どんな分布にせよ、

x = f(rand(n))

として、f, n を適当に選ぶことで表現できるので、

f, n = Random.分布変換関数生成_分布の種類(パラメータ)

とかが効率的な...
akr (Akira Tanaka)
10:33 PM Feature #4147: Array#sample で重みを指定したい
=begin
>「重みを変えずに繰り返し抽選したい」というユースケースで有利になる
>んですが、汎用性に欠けますかね。結構ありそうだと思うんですが。

ほとんどの場合は一回の呼び出しで大量の抽出を行うことで代替可能ではないでしょうか。

繰り返しになりますが、二分探索は最適なアルゴリズムではない(簡便性を犠牲にする割に半端にしか速くならない)というのも重要な点で、高速な細切れ抽出を本当に求めるのであれば、以下のサイトのコードのように専用のクラスを用...
oj (Yoji Ojima)
09:32 PM Feature #4147: Array#sample で重みを指定したい
=begin
遠藤です。

2010年12月20日14:06 Yoji Ojima <redmine@ruby-lang.org>:
>>係数レベルの性能には私も大して興味ないんですが、オーダが違うとなると
>>さすがに気になります。特に、機能的には O(log n) で実現できるのに、
>>見た目の都合で API を O(n) にしか実装できないよう制約してしまおうと
>>いう話ですから。記述性の話もよくわかるので、悩ましいところですが。
>
> メ...
mame (Yusuke Endoh)
02:06 PM Feature #4147: Array#sample で重みを指定したい
=begin
>係数レベルの性能には私も大して興味ないんですが、オーダが違うとなると
>さすがに気になります。特に、機能的には O(log n) で実現できるのに、
>見た目の都合で API を O(n) にしか実装できないよう制約してしまおうと
>いう話ですから。記述性の話もよくわかるので、悩ましいところですが。

メソッド自体が高速であっても、そのために累積分布を渡す必要があるというのでは、たとえば要素の重みを一つだけ変えて再抽選というときには...
oj (Yoji Ojima)
12:43 PM Feature #4147: Array#sample で重みを指定したい
=begin
遠藤です。

2010年12月20日1:27 Yoji Ojima <redmine@ruby-lang.org>:
> 私個人としては高速性に興味はなく、最初のサンプルのような処理を標準機能の範囲で簡潔に記述することができさえすれば満足です。

係数レベルの性能には私も大して興味ないんですが、オーダが違うとなると
さすがに気になります。特に、機能的には O(log n) で実現できるのに、
見た目の都合で API を O(n) にしか実装...
mame (Yusuke Endoh)
01:26 AM Feature #4147: Array#sample で重みを指定したい
=begin
>Ruby でも同じ使われ方が期待できるんですかねえ。
>いよいよ、まずは gem で作って配布して、多くの需要があることがわかった
>ら取り込む、という手順を踏むほうがいいような気がしてきました。

私個人としては高速性に興味はなく、最初のサンプルのような処理を標準機能の範囲で簡潔に記述することができさえすれば満足です。

単純な復元抽出に関しては (1..n).map { ary.sample } で代替できるので不要という意...
oj (Yoji Ojima)
12:41 AM Feature #4147: Array#sample で重みを指定したい
=begin
遠藤です。

2010年12月19日22:52 Yoji Ojima <redmine@ruby-lang.org>:
>>でも、重みを累積分布として与える例はないですねえ。
>>sample ごときで常に O(n) かかってほしくないと思うのですが。
>
> 復元抽出の高速アルゴリズムである Walker's alias method を使うのに必要な情報は累積分布ではないので、それを引数として与えるというのは、簡便性重視と高速性重視のどち...
mame (Yusuke Endoh)
10:39 PM Revision 379f68fe (git): * pack.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
10:33 PM Bug #4174 (Assigned): 1F1E on rdoc tests
=begin

=end
naruse (Yui NARUSE)
08:57 PM Bug #4174 (Closed): 1F1E on rdoc tests
=begin
During `make test-all', rdoc tests fails as follows:

1) Failure:
test_inline_source_is_enabled_by_default(Rake::TestRDocTask) [/home/yanagi/ruby/test/rake/test_rdoc_task.rb:65]:
Failed assertion, no message given.

...
kyanagi (Kouhei Yanagita)
09:25 PM Revision 182b6148 (git): * test/rexml/test_contrib.rb (ContribTester#test_pos): should not
use fixed path name for tests. [ruby-dev:42827]
* test/rexml/test_sax.rb (SAX2Tester#test_socket): should not use
fixed port for tests. [ruby-dev:42828]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30284 b2dd03c8-39d4-4d8f-98ff...
nobu (Nobuyoshi Nakada)
09:10 PM Revision f4db8aed (git): * compile.c (setup_args), vm.c (invoke_block_from_c),
vm_insnhelper.c (caller_setup_args): reverted r30241 and r30243
except for the test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
04:55 PM Revision 2d0d54f2 (git): * 2010-12-21
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@30282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
04:55 PM Revision 20ac254b (git): * lib/webrick/https.rb: uninitialized instance variables.
Backport a part of r20864 for ruby_1_8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@30281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Hiroshi Nakamura
04:45 PM Revision da4d3e84 (git): * io.c : add an extra byte to buffer for the specification of read
in Windows. see [ruby-core:33460] and r29980. and, we have to
discuss how to do this one byte.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Masaya Tarui
04:14 PM Feature #4151: Enumerable#categorize
=begin
Hello Akira,

On 2010/12/14 18:41, Tanaka Akira wrote:
> 2010/12/12 "Martin J. Dürst"<duerst@it.aoyama.ac.jp>:
>>
>> There are already such methods. At least group_by. Your proposal seems to be
>> a very special way to conv...
duerst (Martin Dürst)
04:07 PM Revision 36f1477f (git): * Backported the fix at
Mon Sep 13 09:23:58 2010 NARUSE, Yui <naruse@ruby-lang.org>
* ext/openssl/ossl_bn.c (ossl_bn_is_prime): fix comparison
with rb_scan_args. Before this fix, OpenSSL::BN#prime?
is fully broken.
git-svn-id: s...
Hiroshi Nakamura
04:05 PM Revision e4906ffa (git): Make test-all run. require_relative is from 1.9.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@30278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Hiroshi Nakamura
03:40 PM Revision 12b8ff1f (git): * error.c: Fix build error for win32. This regression was
introduced by r30271.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
kosaki (Motohiro KOSAKI)
03:21 PM Revision 855cf86a (git): * 2010-12-21
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@30276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
03:21 PM Revision cb0ea9dd (git): * Backported the fix at
Mon Oct 4 09:30:42 2010 NARUSE, Yui <naruse@ruby-lang.org>
* ext/openssl/lib/openssl/bn.rb (Integer#to_bn): OpenSSL::BN.new
accepts only Strings, so call Integer#to_s(16).
16 is for an optimization. [ruby-...
Hiroshi Nakamura
03:20 PM Revision 1ff6a195 (git): * thread.c (thread_cleanup_func): Moved interrupted_lock
destroying code from native_thread_destroy() to
thread_cleanup_func() because it's platform independent logic.
* thread_win32.c (native_thread_destroy): ditto.
* thread_pthread.c (native_thread_destroy): ditto....
kosaki (Motohiro KOSAKI)
03:16 PM Revision 49fbf28b (git): * 2010-12-21
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
03:16 PM Revision 97da02b2 (git): * thread.c (thread_cleanup_func): Don't touch native threading
resource at fork. Sadly this is purely bandaid. We need to
implement proper fix later. [Bug #4169] [ruby-core:33767]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
kosaki (Motohiro KOSAKI)
02:49 PM Revision 7503f193 (git): * error.c (exit_success_p): Check status code more carefully.
status code may have garbage in upper bit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
kosaki (Motohiro KOSAKI)
02:13 PM Revision 8f6c7296 (git): * node.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
01:28 PM Feature #4172: Named arguments/parameters support
=begin
Hi,

In message "Re: [ruby-core:33774] [Ruby 1.9-Feature#4172][Open] Named arguments/parameters support"
on Mon, 20 Dec 2010 08:13:36 +0900, Rodrigo Rosenfeld Rosas <redmine@ruby-lang.org> writes:

|Feature #4172: Named ...
matz (Yukihiro Matsumoto)
08:13 AM Feature #4172: Named arguments/parameters support
=begin
Sorry, I meant:

tag(tag_name -> 'div', content -> 'Ruby is getting even more awesome with this feature!')
=end
rosenfeld (Rodrigo Rosenfeld Rosas)
08:12 AM Feature #4172 (Rejected): Named arguments/parameters support
=begin
It is usual in the Ruby community to use the idiom

def method(options={})
param1, param2 = options.values_at(:param1, :param2) # or {param1: 'default1', param2: 2}.collect{|k, v| options[k] || v }
...
end

ins...
rosenfeld (Rodrigo Rosenfeld Rosas)
01:23 PM Revision 32d4fcdc (git): merges r29962 from trunk into ruby_1_9_2.
--
* thread_pthread.c (native_cond_*): Check return code.
(Some OSs except Linux return error code).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
01:23 PM Revision 479bf5e5 (git): merges r29952 from trunk into ruby_1_9_2.
--
* time.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
01:23 PM Revision d66c22bf (git): merges r29951 from trunk into ruby_1_9_2.
--
* time.c (leap_year_v_p): fixed typo. [ruby-dev:42631]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
01:23 PM Revision ac0a41e9 (git): merges r29932 from trunk into ruby_1_9_2.
--
* re.c (rb_reg_initialize_str): should succeed the taint status from
the origin. [ruby-core:33338]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
01:23 PM Revision c870705d (git): merges r29885 from trunk into ruby_1_9_2.
--
* vm.c (rb_thread_mark): should mark self in conrol
frames. [ruby-core:33289]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
01:22 PM Revision cc3a7df1 (git): merges r29630 from trunk into ruby_1_9_2.
--
* iseq.c (iseq_s_compile): fix optional argument.
a patch from Yutaka HARA [ruby-core:32953] [Ruby 1.9-Bug#4001]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
01:22 PM Revision 26879c17 (git): merges most of r29882 from trunk into ruby_1_9_2.
--
added some tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
01:22 PM Revision d3418343 (git): merges r29868 and r29872 from trunk into ruby_1_9_2.
--
* string.c (rb_str_inspect): append for each chars instead of bulk
copy if encoding conversion is needed. [ruby-core:33283]
--
* string.c (rb_str_inspect): fix for ascii-compatible external
encoding and different encoding string....
yugui (Yuki Sonoda)
01:22 PM Revision 0d0636d2 (git): merges r29848 and r29852 from trunk into ruby_1_9_2.
--
* string.c (rb_str_concat): set ENC_CODERANGE_VALID when the
receiver is 7BIT and the argument is non ASCII.
--
Fix r29848's test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30261 b2dd03c8-39d4-4d8f-98ff-823fe6...
yugui (Yuki Sonoda)
01:22 PM Revision 7decd09b (git): merges r29840 from trunk into ruby_1_9_2.
--
add dependency(insns.inc) to compile.obj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
01:22 PM Revision 35c70b21 (git): merges r29808 and r29822 from trunk into ruby_1_9_2.; workaround for StringIO.
--
* lib/csv.rb: Upgrading output encoding as needed. [ruby-core:33135]
--
* lib/csv.rb: Upgrading output encoding with ASCII content
as needed. [ruby-core:33229]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30259...
yugui (Yuki Sonoda)
01:22 PM Revision 0e1cd3e3 (git): merges r29807 from trunk into ruby_1_9_2.
--
* vm_insnhelper.c (vm_throw): remove fear of undefined behavior :-)
Coverity Scan found this bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
01:22 PM Revision 139ab718 (git): merges r29804 from trunk into ruby_1_9_2.
--
* pack.c (PACK_ITEM_ADJUST): return nil not result array and yield
values if block is given. [ruby-core:33193]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
01:22 PM Revision 79128855 (git): merges r29803 from trunk into ruby_1_9_2.
--
* regparse.c (and_cclass, or_cclass): fix memory leak. Coverity Scan
found this bug. [ruby-dev:42579]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
yugui (Yuki Sonoda)
01:22 PM Revision b6e3b715 (git): merges r29800 from trunk into ruby_1_9_2.
--
* eval_intern.h (CHECK_STACK_OVERFLOW): it was not intended to add
size_t to a pointer typed VALUE*. Coverity Scan found this defect.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30255 b2dd03c8-39d4-4d8f-98ff-82...
yugui (Yuki Sonoda)
01:22 PM Revision a90f3bcb (git): merges r29799 from trunk into ruby_1_9_2.
--
* compile.c (iseq_set_exception_local_table, iseq_set_local_table,
rb_iseq_build_from_ary): fix type inconsistency (which is benign
because sizeof(ID) == sizeof(ID*), though). Coverity Scan found
these bugs.
git-svn-id: svn+ss...
yugui (Yuki Sonoda)
12:56 PM Bug #4173 (Closed): TestProcess#test_wait_and_sigchild が、たまに失敗する
=begin
ごくたまに、ruby/test_process.rb の TestProcess#test_wait_and_sigchild が失敗します。

1) Failure:
test_wait_and_sigchild(TestProcess) [/export/home/ksmakoto/ruby-git/test/ruby/test_process.rb:1194]:
[ruby-core:19744].
<[true]> ex...
metanest (Makoto Kishimoto)
11:06 AM Revision 13569788 (git): * NEWS: add #__id__ and #object_id. [ruby-dev:42778]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e znz (Kazuhiro NISHIYAMA)
10:25 AM Revision 237edd7a (git): * thread_pthread.c (native_thread_destroy): Fixed gvl_cond leak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e kosaki (Motohiro KOSAKI)
04:50 AM Revision 1695653f (git): Update NEWS, add ChangeLog entry for RDoc 3.0.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e drbrain (Eric Hodel)
03:32 AM Revision 9d767bc2 (git): There is no Perl parser in RDoc 3 ☹
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e drbrain (Eric Hodel)
03:22 AM Revision 2ef9c50c (git): Import RDoc 3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e drbrain (Eric Hodel)
01:27 AM Feature #4015 (Closed): File::DIRECT Constant for O_DIRECT
=begin
This issue was solved with changeset r30247.
Run Paint, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end
kosaki (Motohiro KOSAKI)
12:57 AM Bug #4169: Forked processes locked, won't exit
=begin
Hi Ilya,

Can you please try the attached patch?
=end
kosaki (Motohiro KOSAKI)

12/19/2010

11:22 PM Feature #3647: Array#sample(n, replace=false)
遠藤です。
2010年12月11日23:38 Yukihiro Matsumoto <matz@ruby-lang.org>:
> まつもと ゆきひろです
> ...
同じく、この機能は
```ruby
(1..n).map { ary.sample }
```
で済むので、
```ruby
ary.sample(replace: true)
```
じゃ字数も変わらないし、本当にいるのかなという気がします。
まあ `Array#sample` 自体も `ar...
mame (Yusuke Endoh)
11:13 PM Bug #4169: Forked processes locked, won't exit
=begin
The following reporter provided backtrace indicate this is ruby's bug.
I don't think this is god specific issue. And I double rb_f_fork() is broken now.


> (gdb) bt
> #0 0x00896f5d in pthread_cond_destroy@@GLIBC_2.3....
kosaki (Motohiro KOSAKI)
11:01 PM Bug #4169 (Assigned): Forked processes locked, won't exit
=begin
I hope fix this issue ASAP really. Do you have a stable reproduce way?
=end
kosaki (Motohiro KOSAKI)
10:52 PM Feature #4147: Array#sample で重みを指定したい
=begin
まつもと ゆきひろです

In message "Re: [ruby-dev:42806] Re: [Ruby 1.9-Feature#4147] Array#sample で重みを指定したい"
on Sun, 19 Dec 2010 20:17:57 +0900, Yusuke ENDOH <mame@tsg.ne.jp> writes:

|たとえみなさんが合意しても、matz が承認を示さない限り new feature は
...
matz (Yukihiro Matsumoto)
10:45 PM Feature #4147: Array#sample で重みを指定したい
=begin
>でも、重みを累積分布として与える例はないですねえ。
>sample ごときで常に O(n) かかってほしくないと思うのですが。

復元抽出の高速アルゴリズムである Walker's alias method を使うのに必要な情報は累積分布ではないので、それを引数として与えるというのは、簡便性重視と高速性重視のどちらにも寄らない中途半端な仕様であると考えます。
=end
oj (Yoji Ojima)
09:15 PM Feature #4147: Array#sample で重みを指定したい
=begin
Yuguiです。

2010/12/19 Masaya TARUI <tarui@prx.jp>:
>> じゃあ反対ないので実装はともかく、この仕様は基本入れる方向で考えましょう。反対の人は意思表示お早めに。
> 仕様が詰められていないと思うので、そういう意味で消極的反対です。

同意見です。仕様をもっとよく考えるべきです。

ニーズについては頷けるので、何らかの形で分布関数を与えることには異論はありません。
ここで、幾つかの考慮すべき...
yugui (Yuki Sonoda)
08:22 PM Feature #4147: Array#sample で重みを指定したい
=begin
遠藤です。

2010年12月19日15:20 Yoji Ojima <redmine@ruby-lang.org>:
>>後、個人的な感想では重みをブロックで決めるのがスッキリしません。
>
> R では重みの配列を引数として渡すようになっているようです。
> http://stat.ethz.ch/R-manual/R-devel/library/base/html/sample.html
>
> ブロックが嫌か、または少しでも高速に...
mame (Yusuke Endoh)
08:18 PM Feature #4147: Array#sample で重みを指定したい
=begin
遠藤です。

2010年12月19日14:33 Urabe Shyouhei <shyouhei@ruby-lang.org>:
> (2010/12/19 14:02), Yusuke ENDOH wrote:
>> 卜部さんの [ruby-dev:42791] が、一読すると採択自体はほぼ決定みたいに
>> 読めますが、「パッチがあれば matz の承認が降りやすくなる」という意味
>> (のはず) です。
>
> いや、あの状況では...
mame (Yusuke Endoh)
08:13 PM Feature #4147: Array#sample で重みを指定したい
=begin
遠藤です。

2010年12月19日14:06 Masaya TARUI <tarui@prx.jp>:
> #3647が入らなかったとして、仕様を考えると大体3通りがあると思います。
> 1)重みを与えた時は復元抽出にする。
> 2)取り出されたアイテムの重みを-1する。 (-1以外もあるかもしれませんが)
> 3)重みと複数個抽出両方与えられたらエラーにする。
>
> と挙げてみたもののどれも今一な仕様に思えます。


4) 取...
mame (Yusuke Endoh)
03:20 PM Feature #4147: Array#sample で重みを指定したい
=begin
>後、個人的な感想では重みをブロックで決めるのがスッキリしません。

R では重みの配列を引数として渡すようになっているようです。
http://stat.ethz.ch/R-manual/R-devel/library/base/html/sample.html

ブロックが嫌か、または少しでも高速にしたいと考えるなら R と同じ方法でも良いですが、私はブロックを使う方が Ruby らしいし、「引数の意味が何だか忘れる」心配もなくて...
oj (Yoji Ojima)
02:36 PM Feature #4147: Array#sample で重みを指定したい
=begin
>#3647が入らなかったとして、仕様を考えると大体3通りがあると思います。
>1)重みを与えた時は復元抽出にする。
>2)取り出されたアイテムの重みを-1する。 (-1以外もあるかもしれませんが)
>3)重みと複数個抽出両方与えられたらエラーにする。

4) 取り出されたアイテムの重みを 0 にする。

が、もっとも整合性のある仕様ではないでしょうか。
=end
oj (Yoji Ojima)
02:33 PM Feature #4147: Array#sample で重みを指定したい
=begin
(2010/12/19 14:02), Yusuke ENDOH wrote:
> 卜部さんの [ruby-dev:42791] が、一読すると採択自体はほぼ決定みたいに
> 読めますが、「パッチがあれば matz の承認が降りやすくなる」という意味
> (のはず) です。

いや、あの状況ではtrunkに突っ込む気まんまんでしたけどね。なんせ拒否する理由が
なかったし。

まあ反対意見が出てきたことですし、今の時点ではみなさんが合意する...
shyouhei (Shyouhei Urabe)
02:06 PM Feature #4147: Array#sample で重みを指定したい
=begin
> じゃあ反対ないので実装はともかく、この仕様は基本入れる方向で考えましょう。反対の人は意思表示お早めに。
仕様が詰められていないと思うので、そういう意味で消極的反対です。

複数個取り出すときは重みはどうなるんでしょうか?

現在のsampleの仕様は非復元抽出なので一度取り出されたitemはもう取り出されないのですが、
重みを与える場合の仕様が不明確だと思います。

復元抽出を入れたいという要望は
[ruby-dev:41918] ...
tarui (Masaya Tarui)
02:03 PM Feature #4147: Array#sample で重みを指定したい
=begin
2010年12月19日13:33 Yusuke ENDOH <mame@tsg.ne.jp>:
> ちなみに、new feature の採択に必要なのは、積極的な賛成ではなく、matz
> の承認です。
> 多くの人が賛成しても matz がダメと言えば入りません。

言い直し。

多くの人が賛成しても、matz が「よし」と言わない限り入りません。


卜部さんの [ruby-dev:42791] が、一読すると採択自体はほぼ決定み...
mame (Yusuke Endoh)
01:33 PM Feature #4147: Array#sample で重みを指定したい
=begin
遠藤です。

2010年12月19日12:41 Yoji Ojima <redmine@ruby-lang.org>:
>>これだと毎回 each することになりますよね。
>
> もちろんそうですが、これはゲームでの利用を意図したもので、毎回と言うほど何度も繰り返し呼び出すことは想定していません。
>
> モンテカルロシミュレーション等、速度が重要な場合は Ruby 自体が選択されないのではないかと思います。


個人的には、そうい...
mame (Yusuke Endoh)
12:41 PM Feature #4147: Array#sample で重みを指定したい
=begin
>これだと毎回 each することになりますよね。

もちろんそうですが、これはゲームでの利用を意図したもので、毎回と言うほど何度も繰り返し呼び出すことは想定していません。

モンテカルロシミュレーション等、速度が重要な場合は Ruby 自体が選択されないのではないかと思います。
=end
oj (Yoji Ojima)
11:48 AM Feature #4147: Array#sample で重みを指定したい
=begin
ちょっと諄いようですが、私は「積極的に反対」というわけではありません。
=end
hasari (Hiro Asari)
11:44 AM Feature #4147: Array#sample で重みを指定したい
=begin
On Dec 18, 2010, at 9:15 PM, Yoji Ojima wrote:

> 需要という意味ではさほど違いがあるようには思えませんが、どんなものでしょうか。


需要だけが標準に入れるかどうかの物差しである、という意味に取られたのでしたら
私の言葉足らずでした。すみません。

「既に在るものを外す」には「今無いものを入れる」よりも多くの労力が必要だと思うので、
今から入れるものには慎重になるべき、という意味でした。...
hasari (Hiro Asari)
11:25 AM Feature #4147: Array#sample で重みを指定したい
=begin
遠藤です。

2010年12月18日16:20 Yoji Ojima <redmine@ruby-lang.org>:
> 一週間経って特に反対意見はないようですが、実際にパッチを書いたら取り込んでいただけるものなのでしょうか。積極的な賛成がなければダメでしょうか。

機能自体には反対ではないものの、API がよくないと思います。
これだと毎回 each することになりますよね。

あまりいい対案がないので黙っていたのですが、どうしてもや...
mame (Yusuke Endoh)
11:15 AM Feature #4147: Array#sample で重みを指定したい
=begin
「均一確率での標本抽出は標準で必要だが、その重み指定は不要」とする合理的な理由があるかというのがポイントではないかと考えます。

需要という意味ではさほど違いがあるようには思えませんが、どんなものでしょうか。
=end
oj (Yoji Ojima)
10:31 AM Feature #4147: Array#sample で重みを指定したい
=begin
あさりです。

失礼ですが、これ、標準に入れるほどの需要があるんでしょうか。

積極的に反対という訳ではないですが、「あると便利」くらいだったらgemとかの方が無難だと思います。
=end
hasari (Hiro Asari)
01:37 AM Feature #4147 (Assigned): Array#sample で重みを指定したい
=begin
じゃあ反対ないので実装はともかく、この仕様は基本入れる方向で考えましょう。反対の人は意思表示お早めに。

実装はCで書かれたものがあると取り込まれるまでは早くなる可能性が高いと思います。なければ俺が書くまでお待ちください。
=end
shyouhei (Shyouhei Urabe)
04:18 PM Revision d7effd50 (git): * 2010-12-20
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
04:18 PM Revision a3ba982c (git): * io.c (Init_IO): Added O_DIRECT. This feature was propsed by Run Paint Run Run.
[Feature #4015] [ruby-core:33018]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
kosaki (Motohiro KOSAKI)
10:15 AM Revision 3f929a07 (git): * 2010-12-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
10:15 AM Revision 9035b0e7 (git): * marshal.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)

12/18/2010

06:19 PM Bug #4167: URI.encode encodes reserved character of #
=begin
URI lib says it refers RFC2396, so current behavior is correct in its spec.

Yes, I know current behavior is not what you expect.
So we plan to change the lib to refer RFC3986.

Moreover current URI.encode is simple gsu...
naruse (Yui NARUSE)
01:12 AM Bug #4167: URI.encode encodes reserved character of #
=begin
Just noticed "warn "#{caller(1)[0]}: warning: URI.escape is obsolete" if $VERBOSE".

What is the replacement at this time?
=end
harking (George M. Harkin)
12:43 AM Bug #4167: URI.encode encodes reserved character of #
=begin
Workaround is to use

exp = URI.encode(x, Regexp.new("[^#{URI::PATTERN::UNRESERVED}#{URI::PATTERN::RESERVED}#]", false, 'N'))

where x is the URL with a # symbol for an anchor tag
=end
harking (George M. Harkin)
12:07 AM Bug #4167 (Closed): URI.encode encodes reserved character of #
=begin
URI.encode's default behavior is to follow RFC 2732 [http://tools.ietf.org/html/rfc2732] which includes # in the list of characters to URI encode.

The updated RFC 3896 [http://tools.ietf.org/html/rfc3986#section-2.2] includ...
harking (George M. Harkin)
04:20 PM Feature #4147: Array#sample で重みを指定したい
=begin
一週間経って特に反対意見はないようですが、実際にパッチを書いたら取り込んでいただけるものなのでしょうか。積極的な賛成がなければダメでしょうか。
=end
oj (Yoji Ojima)
03:52 PM Bug #4169 (Closed): Forked processes locked, won't exit
=begin
Unfortunately can't pinpoint the exact problem, but this issue has been brought up by a number of people under 1.9.1 and 1.9.2 when running "god":
https://github.com/mojombo/god/issues#issue/6 - see full thread

Example tra...
igrigorik (Ilya Grigorik)
02:37 PM Feature #4151: Enumerable#categorize
=begin
2010/12/16 Run Paint Run Run <runrun@runpaint.org>:

> We currently have #chunk, #group_by--so to some extent #partition--and
> #slice_before for segregating an Enumerable into an Enumerable of
> Enumerables. I understand the...
akr (Akira Tanaka)
12:55 PM Revision 7d0e6734 (git): * vsnprintf.c (BSD_vfprintf): suppress warning: "_WIN32" is not defined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e znz (Kazuhiro NISHIYAMA)
07:02 AM Revision cd3f980e (git): * compile.c (setup_args), vm.c (invoke_block_from_c),
vm_insnhelper.c (caller_setup_args): fix of r30241. lambda block
shoud check argument number.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
05:43 AM Revision 0316582e (git): * load.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
02:43 AM Feature #4168: WeakRef is unsafe to use in Ruby 1.9
=begin
Rdoc comments on the WeakReference class didn't get synced with the code. Updated file attached that just fixes the comments.
=end
bdurand (Brian Durand)
01:57 AM Feature #4168 (Closed): WeakRef is unsafe to use in Ruby 1.9
=begin
I've found a couple issues with the implementation of WeakRef in Ruby 1.9.

1. WeakRef is unsafe to use because the ObjectSpace will recycle object ids for use with newly allocated objects after the old objects have been gar...
bdurand (Brian Durand)
01:07 AM Revision 5683ad10 (git): * compile.c (setup_args, iseq_compile_each): optimize AMPER LAMBDA
combination as block.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)

12/17/2010

07:28 PM Feature #2294: [PATCH] ruby_bind_stack() to embed Ruby in coroutine
=begin
SASADA Koichi wrote in post #968830:
> Could you give me a concrete example? (Execution flow)

Please see http://www.ruby-forum.com/topic/198119#866383

> (I'm sorry if I missed the example you already posted)

I also post...
sunaku (Suraj Kurapati)
01:37 PM Feature #4165 (Closed): win32ビルドでbaserubyを設定しなかったときのエラーが非常に不親切
=begin
This issue was solved with changeset r30236.
Motohiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end
usa (Usaku NAKAMURA)
01:35 PM Feature #4165: win32ビルドでbaserubyを設定しなかったときのエラーが非常に不親切
=begin
こんにちは、なかむら(う)です。

In message "[ruby-dev:42783] Re: [Ruby 1.9-Feature#4165][Open] win32ビルドでbaserubyを設定しなかったときのエラーが非常に不親切"
on Dec.17,2010 11:37:13, <usa@garbagecollect.jp> wrote:
> またはそのチェックをBASERUBY自体に仕込んで毎回チェックさせる
> とかい...
usa (Usaku NAKAMURA)
11:37 AM Feature #4165: win32ビルドでbaserubyを設定しなかったときのエラーが非常に不親切
=begin
こんにちは、なかむら(う)です。

In message "[ruby-dev:42782] [Ruby 1.9-Feature#4165][Open] win32ビルドでbaserubyを設定しなかったときのエラーが非常に不親切"
on Dec.17,2010 04:31:18, <redmine@ruby-lang.org> wrote:
> Windowsビルドに関して、一点改善して欲しい点があるのでチケットを切ります。trunkの...
usa (Usaku NAKAMURA)
04:31 AM Feature #4165 (Closed): win32ビルドでbaserubyを設定しなかったときのエラーが非常に不親切
=begin
artonさんが素晴らしい本を書いてくださったのでWindowsのビルド環境構築してみたのですが
(みなさん、「Ruby環境構築講座Windows編」を是非買いましょう。これは素晴らしい本です。
http://tatsu-zine.com/books/winrubybuild)

Windowsビルドに関して、一点改善して欲しい点があるのでチケットを切ります。trunkのソースを
ビルドする場合 baserubyの指定が必要です...
kosaki (Motohiro KOSAKI)
01:25 PM Revision 591ae37a (git): * gc.c (Init_GC): move #__id__ and #object_id to BasicObject.
[ruby-dev:42778]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
matz (Yukihiro Matsumoto)
10:35 AM Revision 5cb97113 (git): * test/mkmf/base.rb (TestMkmf::FakeLog): capture output from mkmf.
* test/mkmf/test_find_executable.rb (test_find_executable):
suppress meaningless diffrences for chkbuild.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
09:35 AM Revision 96064d18 (git): * tool/mkconfig.rb (RbConfig): get rid of unused variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
08:04 AM Revision f913368b (git): * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_require): -r
with no name is ignored.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
04:29 AM Revision c5d383ba (git): * win32/setup.mak (BASERUBY): quit with an error when BASERUBY was not
able to set, just like configure.in does. [ruby-dev:42782]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
U.Nakamura
12:07 AM Feature #4038 (Closed): IO#advise
=begin
This issue was solved with changeset r30229.
Run Paint, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end
kosaki (Motohiro KOSAKI)
 

Also available in: Atom