Project

General

Profile

Activity

From 05/02/2014 to 05/08/2014

05/08/2014

11:46 PM Feature #9816: 文字列内の数字を数値として比較するメソッド
Yui NARUSE wrote:
> なお、メソッド名は String#numericcmp としています。
"2.9" と "2.10" の比較を考えると、
整数の並びの辞書順の比較として 2.9 が大きいとするか、
数 (実数) の比較として 2.10 が大きいとするか、
という考え方の違いがあります。
numericcmp という名前は後者を想起させる気がします。
今回欲しいのは前者だと思うので、それを想起させる名前がいいんじゃない...
akr (Akira Tanaka)
02:25 PM Feature #9816: 文字列内の数字を数値として比較するメソッド
`versioncmp`は'-'と'.'だけ特別扱いって感じですかね。
あと、片方だけが数字で終わっているときの終端チェックが抜けているような。
~~~diff
diff --git i/string.c w/string.c
index 66f667f..855d74f 100644
--- i/string.c
+++ w/string.c
@@ -2639,6 +2639,11 @@ rb_str_numericcmp(VALUE str1, V...
nobu (Nobuyoshi Nakada)
11:58 AM Feature #9816: 文字列内の数字を数値として比較するメソッド
名前はともかく俺が欲しいのは filevercmp のほうかもしれない。
~~~
x #=> ["2.1.10", "2.1.2", "8 layers", "8 layers 2", "8 layers 2.nki", "8 layers.nki", "a16", "a17"]
puts x.sort{|a,b| a.numericcmp(b)}
2.1.2
2.1.10
8 layers
8 layers 2
8 layers 2.nki
8 ...
tadf (tadayoshi funaba)
10:58 AM Feature #9816: 文字列内の数字を数値として比較するメソッド
Kazuhiro NISHIYAMA wrote:
> numericcmp だと複数の数値が入っている文字列を比較するものというのがわかりにくいと思いました。
> ...
名前の候補としてはいいんじゃないですかね。
String に生やしているわけではないので、puppetが使っているのは無視していいと思います。
> coreutils だと filevercmp という名前のようです。
> ...
rpmvercmpは論外として、filevercmpは...
naruse (Yui NARUSE)
10:15 AM Feature #9816: 文字列内の数字を数値として比較するメソッド
numericcmp だと複数の数値が入っている文字列を比較するものというのがわかりにくいと思いました。
最初に思いついたのは versioncmp という名前でしたが、
puppet などで使われているようです。
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/util/package.rb
coreutils だと filevercmp という名前のようです。
https://...
znz (Kazuhiro NISHIYAMA)
09:50 AM Feature #9816: 文字列内の数字を数値として比較するメソッド
+1
自分でいちいち書くのも面倒だし、Gem::Versionをこのために持ってくるのも……という類のメソッドですよね。
usa (Usaku NAKAMURA)
09:37 AM Feature #9816 (Assigned): 文字列内の数字を数値として比較するメソッド
文字列内の数字を数値として比較するメソッドを追加しませんか
そのような比較は一般的な用途としてはGUIシェルのファイラーが比較に用いており、
Windows では StrCmpLogicalW が、OS X では NSString:compare:options:へのNSNumericSearch定数が提供されています。
http://msdn.microsoft.com/en-us/library/windows/desktop/bb759947(v=vs....
naruse (Yui NARUSE)
09:13 PM Bug #9818 (Closed): __builtin_setjmp and __builtin_longjmp caused a build failure on PPC Linux with gcc 4.4.0
From a certain revision around r45503 to r45515, Ruby began to use `__builtin_setjmp` and `__builtin_longjmp` on PPC Linux, instead of `_setjmp` and `_longjmp`. However, `__builtin_setjmp` and `__builtin_longjmp` cause a build failure be... ReiOdaira (Rei Odaira)
09:00 PM Bug #9814 (Assigned): Improving documentation example for Enumerator#peek
zzak (zzak _)
08:07 AM Bug #9814 (Closed): Improving documentation example for Enumerator#peek
The existing example for **Enumerator#peek** doesn't effectively document the behavior when peeking after an enumerator has been entirely consumed. Rather, it documents the behavior of **Enumerator#next**.
This change more effectively...
futureperfect (Erik Hollembeak)
07:51 PM Feature #9781: Feature Proposal: Method#super_method
I've only ever needed to do this in codebases like Rails, where there's an insane amount of inheritance. However, Rails also relies heavily on method_missing, which `super_method` would completely miss.
Anyway, I'd like this method to...
josh.cheek (Josh Cheek)
07:02 PM Revision 2ff10784 (git): * lib/delegate.rb: Fix example of using delegator.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ayumin (Ayumu AIZAWA)
06:46 PM Revision 8b6a874a (git): * lib/shell.rb: add documentation in lib/shell.rb
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ayumin (Ayumu AIZAWA)
06:32 PM Revision 529461df (git): * lib/fileutils.rb: show fileutils require at top.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ayumin (Ayumu AIZAWA)
06:22 PM Revision 9fdf3e3e (git): * 2014-05-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
06:22 PM Bug #7395 (Closed): Negative numbers can't be primes by definition
Applied in changeset r45878.
----------
* lib/prime.rb (Prime#prime?): negative numbers can't be primes
by definition. reported by Ivan Kataitsev. [Bug #7395]
* test/test_prime.rb: add test.
ayumin (Ayumu AIZAWA)
06:22 PM Revision bef8e455 (git): * lib/prime.rb (Prime#prime?): negative numbers can't be primes
by definition. reported by Ivan Kataitsev. [Bug #7395]
* test/test_prime.rb: add test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ayumin (Ayumu AIZAWA)
03:34 PM Bug #9817: The extconf.rb for OpenSSL assumes MingW
I didn't notice this by now, because there was no problem for building mswin at all.
Are these lines really necessary on mingw?
usa (Usaku NAKAMURA)
03:14 PM Bug #9817 (Closed): The extconf.rb for OpenSSL assumes MingW
It appears that the extconf.rb file for openssl assumes mingw. The problem is that gdi32 and wsock32 need to be linked, even for Visual Studio.
The simple fix is to change "`if $mingw`" to "`if File::ALT_SEPARATOR`" on line 40.
djberg96 (Daniel Berger)
09:43 AM Feature #9772: IO#statfs and File::Statfs
Akira Tanaka wrote:
> Yui NARUSE wrote:
> ...
まぁ採否も含めてまつもとさんに判断頂く際に、名前も決めていただくってことでいいかと。
> あるいは、もっと動機に率直なメソッドにしてしまうという手もあって、
> ...
ふむ、確かに今のわたしのユースケースだとこちらのほうが適している気はしますね。
こちらはこちらでいじってみます。
こっちだと Etc.mntinfo とか Etc.df とかですかねぇ
naruse (Yui NARUSE)
04:31 AM Feature #9772: IO#statfs and File::Statfs
Yui NARUSE wrote:
>
> ...
とすると、statvfs があるときは少なくとも statvfs の情報は提供することになるような気がしますね。
statvfs は POSIX で標準化されているので、結局、提案されているメソッドの実際の動作は
statvfs + 環境依存の様々な情報、ということになりそうな気がします。
そうすると常に提供されると期待できるのは statvfs の部分なわけで、やっぱ名前は statvfs のほうがい...
akr (Akira Tanaka)
02:09 AM Feature #9772: IO#statfs and File::Statfs
Akira Tanaka wrote:
> Yui NARUSE wrote:
> ...
他の方が互換実装を提供することに反対はしませんが、わたしがわざわざ実装する動機は欠けますね。
> > なお、NetBSDとOpenBSDでは動くようにした…はずです。
> ...
r45873で直しました。
naruse (Yui NARUSE)
09:40 AM Bug #9815: attr_reader doesn't warn on a uninitialized instance variable
どういう意図でしたっけ。
ちょっとググったけど見当たらず。
ko1 (Koichi Sasada)
09:32 AM Bug #9815 (Closed): attr_reader doesn't warn on a uninitialized instance variable
意図的なものです。
`rb_ivar_get`と`rb_attr_get`の差です。
nobu (Nobuyoshi Nakada)
09:25 AM Bug #9815 (Rejected): attr_reader doesn't warn on a uninitialized instance variable

attr_reader で定義したメソッドでは、-w 時に、未設定の警告「warning: instance variable @bar not initialized」みたいなのが出ないんですが、そういうもんでしょうか。
~~~ruby
class C
attr_reader :foo
def bar; @bar; end
end
C.new.foo
C.new.bar #=> t.rb:4: warning: instance vari...
ko1 (Koichi Sasada)
06:31 AM Revision 2a83260a (git): fixed previous commit mistake.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e U.Nakamura
05:45 AM Revision 16b8aadc (git): object.c: no longer copy tables of classes/modules
* object.c (init_copy): no longer copy tables of classes/modules,
since r45874 rb_mod_init_copy() does it instead.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
05:34 AM Bug #9813 (Closed): Module#initialize_copy does not clean the tables
Applied in changeset r45874.
----------
class.c: always clear tables first
* class.c (`rb_mod_init_copy`): always clear instance variable,
constant and method tables first, regardless the source tables.
[`ruby-dev:48182`] [`...
nobu (Nobuyoshi Nakada)
04:38 AM Bug #9813 (Closed): Module#initialize_copy does not clean the tables
`Module#initialize_copy`で定数やインスタンス変数を持たない`Module`をコピーしても、元の定数やインスタンス変数が残っています。
~~~ruby
m = Module.new do
def x
end
const_set(:X, 1)
@x = 2
end
p m.instance_methods, m.instance_variables, m.constants
#=> [:x]
#=> [:@x]...
nobu (Nobuyoshi Nakada)
05:34 AM Revision 7c072b35 (git): class.c: always clear tables first
* class.c (rb_mod_init_copy): always clear instance variable,
constant and method tables first, regardless the source tables.
[ruby-dev:48182] [Bug #9813]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45874 b2dd03c8-39d4-4d8f-98...
nobu (Nobuyoshi Nakada)
01:57 AM Revision 97cd982a (git): * configure.in: OpenBSD needs to include sys/param.h before include
sys/mount.h. [ruby-dev:48167]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
naruse (Yui NARUSE)
01:17 AM Revision 719804b5 (git): webrick/httpserver.rb: Stop handling requests on shutdown
* lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): stop
handling requests on shutdown, even if the socket is readable
and IO.select() returns true. [Fixes GH-607]
* lib/webrick/server.rb (WEBrick::GenericServer#start): IO.select...
nobu (Nobuyoshi Nakada)
12:28 AM Feature #9777: Feature Proposal: Proc#to_lambda
Beware! The answer on Stack Overflow (http://stackoverflow.com/a/2946734) is wrong, because it does not preserve the value of `self` in the block.
This is better, but still wrong:
~~~
def convert_to_lambda &block
obj = block.bi...
kernigh (George Koehler)

05/07/2014

11:21 PM Revision b9f770ae (git): refactored to test Socket and TCPSocket/TCPServer more consistently.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
05:32 PM Bug #9685: psych-2.0.5 のバックポート
backported a part of r45453 into ruby_2_0_0.
I decided to update only libyaml and not psych itself.
usa (Usaku NAKAMURA)
05:30 PM Revision 30340160 (git): merge revision(s) r45453: [Backport #9798]
* ext/psych/yaml/config.h: ditto.
* ext/psych/yaml/scanner.c: ditto.
* ext/psych/yaml/yaml_private.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
U.Nakamura
05:09 PM Bug #9657: Segfault in bigdecimal/util.rb Float#to_d
backported into ruby_2_0_0 at r45869.
I couldn't reproduce SEGV with wanabe's script, but I believe the fix is right, or at least has no bad side effect :)
usa (Usaku NAKAMURA)
05:07 PM Revision 9bececb7 (git): merge revision(s) 45015: [Backport #9657]
* ext/bigdecimal/bigdecimal.c (BigDecimal_initialize): Insert GC guard.
* ext/bigdecimal/bigdecimal.c (BigDecimal_global_new): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@45869 b2dd03c8-39d4-4d8f-98f...
U.Nakamura
05:00 PM Bug #9743: memory leak in openssl ossl_pkey_verify leaks memory
backported into ruby_2_0_0 at r45868. usa (Usaku NAKAMURA)
04:59 PM Revision b786887a (git): merge revision(s) 45595: [Backport #9743]
* ext/openssl/ossl_pkey.c (ossl_pkey_verify): as EVP_VerifyFinal()
finalizes only a copy of the digest context, the context must be
cleaned up after initialization by EVP_MD_CTX_cleanup() or a
memory leak wi...
U.Nakamura
04:22 PM Bug #9586: Unable to build Ruby 2.1.1 on NetBSD
r45190, r45202, r45204 and r45713 were backported into `ruby_2_1` at r45867. nagachika (Tomoyuki Chikanaga)
04:21 PM Revision 65b76d92 (git): merge revision(s) r45190,r45202,r45204,r45713: [Backport #9586]
configure.in: define SET_THREAD_NAME
* configure.in (SET_THREAD_NAME): define according to
pthread_setname_np variations.
* configure.in: correct pthread_setname_np's prototype on NetBSD.
[Bug #9586]
git-sv...
nagachika (Tomoyuki Chikanaga)
03:49 PM Revision b4946035 (git): merge revision(s) r44619:
test_gc.rb: relax assertion
* test/ruby/test_gc.rb (test_profiler_total_time): GC time may be
shorter than the timer resolution.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45866 b2dd03c8-39d4-4d8f-98ff-823f...
nagachika (Tomoyuki Chikanaga)
03:43 PM Revision 87083e76 (git): * 2014-05-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
03:43 PM Revision d4d04585 (git): gc.c: fix argument types for st_foreach
* gc.c ({free,mark}_{method,const}_entry_i): fix argument types as
st_data_t for st_foreach().
* gc.c (rgengc_unprotect_logging_exit_func_i): add third argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45864 b2dd03c8-39d4-4...
nobu (Nobuyoshi Nakada)
03:36 PM Bug #9750: OpenSSL::SSL::SSLServer can not accept a Socket as it's first parameter
I think this introduces no incompatibility and should be backported. nagachika (Tomoyuki Chikanaga)
12:48 PM Bug #9750 (Closed): OpenSSL::SSL::SSLServer can not accept a Socket as it's first parameter
Applied in changeset r45863.
----------
* ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SSLServer#accept):
Consider Socket#accept as well as TCPServer#accept.
Reported by Sam Stelfox. [ruby-core:62064] [Bug #9750]
akr (Akira Tanaka)
02:18 PM Feature #6074: Allow alias arguments to have a comma
Request for syntax change. nobu (Nobuyoshi Nakada)
06:15 AM Feature #6074: Allow alias arguments to have a comma
Salvaged. https://github.com/ruby/ruby/pull/609 nobu (Nobuyoshi Nakada)
01:12 PM Bug #5330 (Rejected): Bug Report: wrong backtrace
Ulrich Kramer wrote:
>
> ...
No.
caller() doesn't return the current stack frame unless 0 is specified as the argument.
caller() returns an array which contains the caller stack frame and ancestor stack frames.
caller of the to...
akr (Akira Tanaka)
12:48 PM Revision 2dbae9b1 (git): * ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SSLServer#accept):
Consider Socket#accept as well as TCPServer#accept.
Reported by Sam Stelfox. [ruby-core:62064] [Bug #9750]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
akr (Akira Tanaka)
12:22 PM Revision 1386a230 (git): refactoring to extract tcp_pair.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
10:58 AM Bug #9760: mkmf does not allow for linking against custom libraries when a system library is present
In the meantime, third parties can work around this problem by a monkey patch like this:
https://github.com/sparklemotion/nokogiri/commit/c98745d9098487c51685a732f1c5a21d8d07cdad
knu (Akinori MUSHA)
08:24 AM Bug #9811 (Closed): Numeric#step ignores `to` silently by keyword arguments.
Applied in changeset r45861.
----------
numeric.c: check keyword arguments
* numeric.c (`num_step_scan_args`): check keyword arguments and fail
if they conflict with positional arguments.
[`ruby-dev:48177`] [`Bug #9811`]
nobu (Nobuyoshi Nakada)
08:16 AM Bug #9811 (Closed): Numeric#step ignores `to` silently by keyword arguments.
Numeric#stepにキーワード引数を指定すると、終了値が無視されます。
無効なキーワードでもエラーになりません。
~~~ruby
1.step(10, foo: nil)
~~~
nobu (Nobuyoshi Nakada)
08:24 AM Revision a352b0a2 (git): numeric.c: check keyword arguments
* numeric.c (num_step_scan_args): check keyword arguments and fail
if they conflict with positional arguments.
[ruby-dev:48177] [Bug #9811]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
08:10 AM Revision f8661f7f (git): numeric.c: merge miss
* numeric.c (num_step_scan_args): fix merge miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
08:05 AM Revision ba90ac25 (git): numeric.c: num_step_scan_args
* numeric.c (num_step_scan_args): turn a macro into a function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
07:34 AM Revision 5c518025 (git): numeric.c: indent
* numeric.c (ruby_num_interval_step_size): adjust indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
07:03 AM Bug #9677: OpenSSL::PKey::EC#to_text causes a segmentation fault
I found that the segmentation fault occurs when a public_key is not set.
Here is a patch.
~~~
diff --git a/ossl_pkey_ec.c b/ossl_pkey_ec.c
index 5e419bd..070bfc4 100644
--- a/ossl_pkey_ec.c
+++ b/ossl_pkey_ec.c
@@ -574,6 +574,13...
phasis68 (Heesob Park)
06:58 AM Bug #5328: Splat args are treated wrongly in instance_exec and class_exec
Thanks. I'm still trying to wrap my head around it but that's quite helpful. myronmarston (Myron Marston)
05:54 AM Feature #9807: String.new with block
Michael Kohl wrote:
> After a discussion in our team chat today, I wondered if it would be a good idea to have a version of String.new that accepts a block and works as a string builder. Something like
> ...
Like Matthew, I'd also like...
duerst (Martin Dürst)
04:26 AM Revision 082a8864 (git): vm_eval.c: hide intermediate hash
* vm_eval.c (rb_f_local_variables): hide intermediate hash and use
rb_hash_keys() directly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
04:26 AM Revision 5bec2d8c (git): hash.c: make rb_hash_keys extern
* hash.c (rb_hash_keys): make an internal public function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
04:26 AM Revision c8221b4c (git): vm_eval.c: symbol identity
* vm_eval.c (local_var_list_add): use symbol identity, and get rid
of method calls.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
04:26 AM Revision 766478f6 (git): vm_eval.c: valid name IDs only
* vm.c (vm_collect_local_variables_in_heap): use struct local_var_list
instead of VALUE directly.
* vm_eval.c (local_var_list_update): add valid name IDs only.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45854 b2dd03c8-39d4-4d8...
nobu (Nobuyoshi Nakada)
04:26 AM Revision a1bc138f (git): vm.c: clear intermediate hash
* vm.c (rb_f_local_variables): clear intermediate hash after
extracting its keys.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
03:07 AM Revision d4672274 (git): * benchmark/driver.rb: remove debug output and output results into
specified file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ko1 (Koichi Sasada)
02:57 AM Revision 1ddb9c53 (git): * benchmark/driver.rb: add '--rawdata-output=[FILE] option to output
raw results into FILE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ko1 (Koichi Sasada)
02:25 AM Revision 11eb8701 (git): vm_eval.c: exclude hidden variables
* vm_eval.c (rb_f_local_variables): exclude variables hidden by
shadowing. [ruby-core:60501] [Bug #9486]
* vm.c (collect_local_variables_in_iseq): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45850 b2dd03c8-39d4-4d8f-98ff...
nobu (Nobuyoshi Nakada)
02:00 AM Revision c8dbc43d (git): * 2014-05-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
02:00 AM Revision c60e282b (git): rename variables
* vm.c (vm_collect_local_variables_in_heap): rename an argument.
* vm_eval.c (rb_f_local_variables): rename a local variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
12:23 AM Bug #9372: Date function cweek reports innaccurately for the date December 30, 2013
This is a repeated question, so it feels nice to add examples. nobu (Nobuyoshi Nakada)
12:17 AM Bug #9809 (Closed): Date.new(2000,1,1).cweek should == 1
matz (Yukihiro Matsumoto)
12:08 AM Feature #9777: Feature Proposal: Proc#to_lambda
If a user wanted to write it as a proc, then it means that he/she doesn't want it to raise error, doesn't it? nobu (Nobuyoshi Nakada)

05/06/2014

11:45 PM Bug #5328: Splat args are treated wrongly in instance_exec and class_exec
I can remember several documents.
* The document of Proc#lambda?.
* The thread from ruby-core:47453 "yield plus splat unwraps too much"
(I don't recommend reading it in bugs.ruby-lang.org because messages are unintentionally forma...
akr (Akira Tanaka)
04:38 PM Bug #5328: Splat args are treated wrongly in instance_exec and class_exec
Thanks for taking the time to explain.
This surprises me a bit because I've followed ruby development closely for a number of years and this is the first time I've heard of this particular proc vs lambda difference (I know of others l...
myronmarston (Myron Marston)
01:05 PM Bug #5328 (Rejected): Splat args are treated wrongly in instance_exec and class_exec
Ruby 1.9 changes block arguments behavior.
Non-lambda block arguments always expands single array.
(Ruby 1.8 expands sometimes.)
If you needs block arguments behaving as methods, use lambda.
```
% cat splat_args
def foo(arg_1, ...
akr (Akira Tanaka)
11:01 PM Bug #5828: Non anonymous classes can't be frozen, cloned and then inspected
I'm happy for this bug to be closed, as I don't have a need to freeze and clone a class. agrimm (Andrew Grimm)
01:50 PM Bug #5828 (Feedback): Non anonymous classes can't be frozen, cloned and then inspected
The name of anonymous class is searched and cached when it is first inspected.
The cache is implemented as a hidden instance variable of the class.
If the class is frozen, the cache is failed as the exception because the instance varia...
akr (Akira Tanaka)
09:13 PM Bug #9806: URI#encode doesn't encode characters '[' and ']'. They should be encoded as %5B and %5D respectively.
Notes:
* Per RFC 2396 section 2.4.3 "Data corresponding to excluded characters **must** be escaped in order to be properly represented within a URI."
* Per RFC 2396 section 2.2 reserved characters are ";" | "/" | "?" | ":" | "@" | "&" ...
charlez (Charles Leu)
01:29 AM Bug #9806 (Closed): URI#encode doesn't encode characters '[' and ']'. They should be encoded as %5B and %5D respectively.
The subject says it all.
IRB session demonstrating the problem:
charlez$ irb
head :001 > RUBY_VERSION
=> "2.2.0"
head :002 > require 'uri'
=> true
head :003 > my_str = '[ futsal club ]'
=> "[ futsal club ]"
head :004 > URI....
charlez (Charles Leu)
05:25 PM Bug #9810 (Closed): Numeric#step behavior with mixed Float, String arguments inconsistent with documentation
The `Numeric#step` documentation states:
"If any of the arguments are floating point numbers, all are converted to floats..."
https://github.com/ruby/ruby/blob/trunk/numeric.c#L1921
Is the following code intended to be described...
brixen (Brian Shirai)
05:21 PM Bug #9809: Date.new(2000,1,1).cweek should == 1
This looks like correct behaviour. From a previous issue #9372:
A period of time of seven days within a calendar year, starting on a
Monday and identified by its ordinal number within the year; the first
calendar week of the year is...
avit (Andrew Vit)
04:54 PM Bug #9809: Date.new(2000,1,1).cweek should == 1
I see https://bugs.ruby-lang.org/issues/9372
If this is not a bug, please close it, thank you.
zfben (Ben Zhu)
04:41 PM Bug #9809 (Rejected): Date.new(2000,1,1).cweek should == 1
I run `Date.new(2000,1,1).cweek`, the result is 52.
My Ruby version is 2.1.1
zfben (Ben Zhu)
05:17 PM Feature #9777: Feature Proposal: Proc#to_lambda
Another possible reason to convert a Proc to a lambda is to for raising error on arguments
```
foo = -> { puts "hello" }
foo.call(1)
ArgumentError: wrong number of arguments (1 for 0)
from (irb):4:in `block in irb_binding'
f...
schneems (Richard Schneeman)
02:40 PM Feature #9808 (Feedback): Enumerable#argmin_by, #argmax_by
Could you explain what it does? nobu (Nobuyoshi Nakada)
02:00 PM Feature #9808 (Rejected): Enumerable#argmin_by, #argmax_by
What about introducing `Enumerable` `#argmin_by` (and `#argmax_by` too, of course) method?
Use cases are wide from mathematical problems to a general tasks. Here are two very simple examples:
~~~ruby
(1..2).step(0.01).argmin_by{|x| ...
prijutme4ty (Ilya Vorontsov)
02:35 PM Bug #9486 (Closed): Multiple Kernel#local_variables entries with block local parameters
Applied in changeset r45847.
----------
missed ref. [ruby-core:60501] [Bug #9486]
nobu (Nobuyoshi Nakada)
02:35 PM Revision f8366016 (git): missed ref. [ruby-core:60501] [Bug #9486]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
02:29 PM Revision b5cae382 (git): parse.y: no duplicated names
* parse.y (new_bv_gen): no duplicated names, if already added in
shadowing_lvar().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
02:28 PM Revision d750b62d (git): parse.y: remove duplicated names
* parse.y (local_tbl_gen): remove local variables duplicated with
arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
02:28 PM Revision 8a57bb7b (git): parse.y: unused return values
* parse.y (arg_var_gen, local_var_gen): make void since the result
values are not used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
02:18 PM Bug #9019 (Rejected): encoding: EUC-KR or EUC-JP does not seem to work
nobu (Nobuyoshi Nakada)
01:57 PM Bug #9344 (Assigned): warning origin incorrect with instance_eval
nobu (Nobuyoshi Nakada)
11:38 AM Feature #9807: String.new with block
>
> That could be a nice solution to avoid all the Array#join and "".tap
hacks for string creation.
>

Which hacks are these? Also, I don't see how it's different from
´"foo".tap{|s|s<<"bar"}´

Can you give some examples?
phluid61 (Matthew Kerwin)
11:22 AM Feature #9807 (Open): String.new with block
After a discussion in our team chat today, I wondered if it would be a good idea to have a version of String.new that accepts a block and works as a string builder. Something like
string = String.new("foo") do |s|
s << "bar...
citizen428 (Michael Kohl)
09:52 AM Feature #6216: SystemStackError backtraces should not be reduced to one line
https://github.com/ruby/ruby/pull/608 nobu (Nobuyoshi Nakada)
09:50 AM Revision e4b05d91 (git): * lib/time.rb (Time.make_time): Adjust the time zone of "now".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
09:37 AM Revision d85c226f (git): * io.c (io_{read,write}_nonblock): use rb_get_kwargs instead of
rb_hash_aref.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Tadayoshi Funaba
09:04 AM Revision 915ef9ed (git): * lib/time.rb (Time.make_time): Argument validation code moved from
Time.parse and Time.strptime.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
akr (Akira Tanaka)
08:54 AM Revision d03eabd5 (git): eval.c: method name
* eval.c (setup_exception): add the method name to system stack
error message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
08:38 AM Revision 854fffe9 (git): fix typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e znz (Kazuhiro NISHIYAMA)
08:36 AM Bug #9521: [Doc] Fix error in Time.parse documentation (in lib/time)
It seems the original document of that part written by gsinclair used GMT.
But I mistakenly modified to use JST.
I agree that most examples uses EST.
This convention is inherited from time.c.
time.c has a sentence:
"All of these...
akr (Akira Tanaka)
08:18 AM Bug #9521 (Closed): [Doc] Fix error in Time.parse documentation (in lib/time)
Applied in changeset r45837.
----------
* lib/time.rb (Time.parse): [DOC] Fix an example in the documentation.
Reported by Marcus Stollsteimer.
[ruby-core:60778] [Bug #9521] and [ruby-core:61718] [Bug #9682]
akr (Akira Tanaka)
08:27 AM Revision 1c3f862f (git): [DOC] Use EST for previous documentation fix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
08:18 AM Bug #9682 (Closed): [Doc] Improve Time.parse documentation (in lib/time)
Applied in changeset r45837.
----------
* lib/time.rb (Time.parse): [DOC] Fix an example in the documentation.
Reported by Marcus Stollsteimer.
[ruby-core:60778] [Bug #9521] and [ruby-core:61718] [Bug #9682]
akr (Akira Tanaka)
08:18 AM Revision 252afcd9 (git): * lib/time.rb (Time.parse): [DOC] Fix an example in the documentation.
Reported by Marcus Stollsteimer.
[ruby-core:60778] [Bug #9521] and [ruby-core:61718] [Bug #9682]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
akr (Akira Tanaka)

05/05/2014

08:43 PM Feature #9804: File::CREATE as a synonym for File::CREAT
I do not think this increases human overhead to learn: CREATE is an English word, CREAT is not. This would allow me to avoid writing in my code
File::CREATE = File::CREAT
alexeymuranov (Alexey Muranov)
07:34 PM Feature #9804: File::CREATE as a synonym for File::CREAT
alexey.muranov@gmail.com wrote:
> I would like to have `File::CREATE` as a synonym for `File::CREAT`.

At least give a reason for wanting this...

Fwiw, I am against adding more aliases/synonyms to core.
They increases human overh...
normalperson (Eric Wong)
04:53 PM Feature #9804 (Open): File::CREATE as a synonym for File::CREAT
I would like to have `File::CREATE` as a synonym for `File::CREAT`. alexeymuranov (Alexey Muranov)
08:11 PM Feature #9805 (Closed): Backtrace for SystemStackError
The following code:
def a; a end
begin
a
rescue => e
puts e.backtrace.inspect
end
only returns a single line of backtrace like:
/tmp/scratch:3:in `a'
but this is not helpful when debugging....
sawa (Tsuyoshi Sawada)
07:38 PM Revision 08e0c31d (git): * file.c (rb_f_test): removed meaningless "case 'a'".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Tadayoshi Funaba
05:47 PM Feature #8459 (Feedback): Idiomatic method names for Socket
I'm negative.
Such convention makes naming new method more difficult.
Naming is already very difficult.
I don't want to it more difficult.
akr (Akira Tanaka)
05:21 PM Bug #5463 (Rejected): PTY or IO.select timing issue results in no EOF
I think this is not a problem of Ruby. akr (Akira Tanaka)
05:05 PM Bug #5487 (Rejected): popen3 + timeout regression in ruby 1.9
Please avoid Timeout.
Even if it doesn't hang as Ruby 1.8, it doesn't clean child processes.
Thread#join's argument (timeout) is usable to implement to timeout.
```
Open3.popen3("sleep 100 && echo hi", :pgroup=>true) {|i, o, e, w...
akr (Akira Tanaka)
04:51 PM Bug #9685: psych-2.0.5 のバックポート
r45453, r45455 and r45577 were backported into `ruby_2_1` at r45812.
See #9798
nagachika (Tomoyuki Chikanaga)
04:46 PM Misc #9803 (Rejected): document of Removed C API is missing in NEWS
Sorry, I mistook NEWS in ruby_2_1 for trunk... wanabe (_ wanabe)
03:35 PM Misc #9803 (Feedback): document of Removed C API is missing in NEWS
What's the version of NEWS you are seeing?
It is described since r44963.
```
% svn ann NEWS|egrep '9502|rb_check_safe_str'
44963 akr * Deprecated APIs removed. [Feature #9502]
44963 akr rb_check_safe_str -> S...
akr (Akira Tanaka)
02:56 PM Misc #9803 (Rejected): document of Removed C API is missing in NEWS
I found that `rb_check_safe_str()` is removed in ruby-2.1 and trunk.
And I found #9502 and [CAPI\_obsolete\_definitions](https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/CAPI_obsolete_definitions) page, but these changes is not in NE...
wanabe (_ wanabe)
04:38 PM Revision 0c3d5131 (git): * lib/open-uri.rb (OpenURI.open_uri): Call StringIO#close only if
the StringIO object is not closed yet.
Reported by Jordi Massaguer Pla. [ruby-core:42538] [Bug #6010]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
akr (Akira Tanaka)
04:29 PM Revision 5ab5d921 (git): * ext/tk/lib/tkextlib/tkDND/tkdnd.rb: fix typo and missing definition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nagai (Hidetoshi Nagai)
04:16 PM Revision de94db5d (git): merge revision(s) r45760: [Backport #9796]
* gc.c (gc_after_sweep): suppress unnecessary expanding heap.
Tomb heap pages are freed pages here, so expanding heap is
not required.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45833 b2dd03c8-39d...
nagachika (Tomoyuki Chikanaga)
04:11 PM Revision c47d59a0 (git): * benchmark/driver.rb: define File::NULL if not defiend and /dev/null
is available to run benchmark driver on ruby 1.9.2.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ko1 (Koichi Sasada)
04:03 PM Feature #5677 (Rejected): IO C API
akr (Akira Tanaka)
04:03 PM Feature #5677: IO C API
I reject this issue because no one implement it until now.
It is too difficult to discuss concretely without implementation.
akr (Akira Tanaka)
03:17 PM Feature #7476: missing "IP_TRANSPARENT" constant for IP sockets.
It seems glibc-2.12 provides IP_TRANSPARENT.
So there is no problem to use it now.
akr (Akira Tanaka)
03:15 PM Feature #7476 (Closed): missing "IP_TRANSPARENT" constant for IP sockets.
Applied in changeset r45830.
----------
* ext/socket/mkconstants.rb: Add IP_TRANSPARENT.
IP_TRANSPARENT is provieded since glibc-2.12.
Reported by Eliezer Croitoru. [ruby-core:50372] [Bug #7476]
akr (Akira Tanaka)
03:15 PM Revision da35e754 (git): * 2014-05-06
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
03:15 PM Revision 17a2f1ec (git): * ext/socket/mkconstants.rb: Add IP_TRANSPARENT.
IP_TRANSPARENT is provieded since glibc-2.12.
Reported by Eliezer Croitoru. [ruby-core:50372] [Bug #7476]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
akr (Akira Tanaka)
02:12 PM Revision 693703c3 (git): [DOC]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
02:04 PM Bug #9089 (Rejected): rb_fix2uint no longer raises a RangeError when given negative values
This issue is not acceptable because it is very inconsistent that only FIX2UINT on 64bit environment rejects negative numbers.
Changing the behavior of other functions, NUM2Uxxx and FIX2Uxxx, is too incompatible.
If people needs rigi...
akr (Akira Tanaka)
01:37 PM Feature #3348 (Closed): rubyspec: Kernel.spawn redirects both STDERR and STDOUT to the given name ERROR
Applied in changeset r45828.
----------
* process.c (check_exec_redirect): Open the file in write mode for
redirect from [:out, :err].
Proposed and implemented by Yusuke Endoh.
[ruby-dev:41430] [Feature #3348]
akr (Akira Tanaka)
01:37 PM Revision 7a69a358 (git): * process.c (check_exec_redirect): Open the file in write mode for
redirect from [:out, :err].
Proposed and implemented by Yusuke Endoh.
[ruby-dev:41430] [Feature #3348]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
akr (Akira Tanaka)
01:10 PM Bug #9618 (Closed): Pathname#cleanpath creates mixed path separators
Applied in changeset r45827.
----------
* ext/pathname/lib/pathname.rb (cleanpath_aggressive): make all
separators File::SEPARATOR from File::ALT_SEPARATOR.
Reported by Daniel Rikowski.
Fixed by Nobuyoshi Nakada. [Bug #9618]
* e...
akr (Akira Tanaka)
01:09 PM Revision edacb3a9 (git): * ext/pathname/lib/pathname.rb (cleanpath_aggressive): make all
separators File::SEPARATOR from File::ALT_SEPARATOR.
Reported by Daniel Rikowski.
Fixed by Nobuyoshi Nakada. [Bug #9618]
* ext/pathname/lib/pathname.rb (cleanpath_conservative): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby...
akr (Akira Tanaka)
12:49 PM Feature #9625 (Closed): Define `Pathname#/` to append to the path
Applied in changeset ruby-trunk:r45826.
----------
* ext/pathname/lib/pathname.rb (Pathname#/): Aliased to Pathname#+.
Suggested by Alexey Muranov. [ruby-core:61432] [Feature #9625]
akr (Akira Tanaka)
12:49 PM Revision 391fc2ee (git): * ext/pathname/lib/pathname.rb (Pathname#/): Aliased to Pathname#+.
Suggested by Alexey Muranov. [ruby-core:61432] [Feature #9625]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
akr (Akira Tanaka)
08:28 AM Revision a210f7c2 (git): * math.c (rb_math_sqrt): omitted exporting an unused function,
anyway.
* internal.h: follows the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Tadayoshi Funaba
07:33 AM Revision 78fa9672 (git): add a comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
04:45 AM Feature #9794 (Closed): DateTime.strptime() doesn't work correctly for '%s %z'
tadf (tadayoshi funaba)
04:45 AM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'

> どうダメなのかわからないのでなんともいいようがない、というのが私の正直な感想です。
俺にはもう関係ない事ですし、余計な事でした。
田中さんのほうで気になってなかったのなら別に構わないと思います。
tadf (tadayoshi funaba)
03:02 AM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
tadayoshi funaba wrote:
> とりあえず、'%z' のみとかはダメらしいですから。
そうですね。
Time.strptime("+09:00", "%z") も受け付けていたので、原作者の意図するものではないということで変えてみました。
> ...
どうダメなのかわからないのでなんともいいようがない、というのが私の正直な感想です。
akr (Akira Tanaka)
03:41 AM Feature #9549 (Feedback): Improvements to Time::strptime
Erik Michaels-Ober wrote:
>
> ...
I'm not sure that is a good idea.
For example, -4712-01-01 is not a special date in Time.
> * Raise ArgumentError if time passed to `Time::strptime` is invalid. This fixes a Ruby bug and adds a te...
akr (Akira Tanaka)
02:47 AM Revision c2a87a1f (git): * lib/time.rb (Time.strptime): Raise ArgumentError if Date._strptime
doesn't extract date information.
Reported by tadayoshi funaba. [ruby-core:62349]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
akr (Akira Tanaka)

05/04/2014

11:54 PM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
tadayoshi funaba wrote:
> 変更しました。
ありがとうございます。
> ...
要らなくなることはないと思います。義務はないのでまた手伝ってください。
> 今後は横断的にちょっかいを出したり、
> ...
今後ともよろしくお願いします。
matz (Yukihiro Matsumoto)
10:16 PM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
Well, I still don't understand what was discussed here, but it seems we have a fix (r45822).
Thanks for doing the sensible thing :)
felipec (Felipe Contreras)
09:10 PM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
変更しました。
今すぐコミッターの活動を停止するわけではありませんが、
今日で date の担当は降ります。
現行の date の実装はこのまま使ってもいいし、要らなくなったら遠慮なく捨てて下さい。
今後は横断的にちょっかいを出したり、
行末の空白を削ったりして、のんびり余生を過そうと思います。
tadf (tadayoshi funaba)
08:34 PM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'

> 「対応しなかった」理由はなんとなくわかりましたし、実際の利用例がなく、単に一貫性のためとかだったらこのまま放置でよかったと思いますが。
git については過大評価じゃないかなと思います。
もうどうでもいいですが。
> ...
まつもとさんは大変だと思います (俺も原因になってるし)。
tadf (tadayoshi funaba)
08:01 PM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'

> Time.parse は現在時刻で補完するという仕様だったからです。
> ...
DateTime でも補完はしますけどね。
> Time.strptime('', '') もそうで、これはまつもとさんが書いた最初からですが、
> ...
とりあえず、'%z' のみとかはダメらしいですから。
ついでだけど、Time の変更がこのまま進むなら to_time とかも直したほうがいいよ。
元々無理のある仕様だったけど、もう完全にダメになりそう。
tadf (tadayoshi funaba)
04:36 PM Feature #9794 (Open): DateTime.strptime() doesn't work correctly for '%s %z'
元々のリポートが「これはバグだ」、「当然対応すべきだ」という態度だったのは置いといて、実際に利便性があり、ほかに実害がない以上、機能拡張として対応したほうがいいと思います。
私が見落としてるのかもしれないけど、今までのふなばさんの主張で「対応すべきでない」理由はわかりませんでした。
「対応しなかった」理由はなんとなくわかりましたし、実際の利用例がなく、単に一貫性のためとかだったらこのまま放置でよかったと思いますが。
これを決定権がないとおっしゃるのであれば...
matz (Yukihiro Matsumoto)
04:23 PM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
tadayoshi funaba wrote:
> Time のほうは
> ...
Time.parse は現在時刻で補完するという仕様だったからです。
そういう仕様だったので、その仕様を変えるまでは、まったく時刻情報がなくても受け付けていました。
Time.strptime('', '') もそうで、これはまつもとさんが書いた最初からですが、
r8068 をみると、Time.parse のコードを複製したところがそのままだから、
という感じかなぁ...
akr (Akira Tanaka)
01:59 PM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
ずっと俺には何の決定権もないって言われ続けているような気がしたけど
今日は本当にそれを実感した。
tadf (tadayoshi funaba)
01:44 PM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
私もさすがに"%z"単体を許すべきとは思いません。それ日付でも時刻でもないから。
それはそれとして、"%s %z"はgitがコミット時間をログに記録するのに使ってるフォーマットなんだそうです。
たしかに、手元の .git/logs/HEAD とかに、すべてのコミットについてこの形式でチェックイン時間とタイムゾーンが記録されている。
これくらい実際に広く使われているツールで頻繁に使われているフォーマットであれば、曜日の場合のように矛盾する情報というわけで...
matz (Yukihiro Matsumoto)
01:23 PM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
なんか本質に近いところを突いたような気がしてきた。
DateTime は日付の核になる所から積み上げられないと、そこは無効になるんだけど、
Time にはそういうのがなくて、仮令、核が虚になってても関係ない。
俺の見方だと、そもそも Time は日付 (時刻) になってなくてもいいって事なんだと思う。
そう考えると納得出来るような気がする。
tadf (tadayoshi funaba)
12:45 PM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'

> そうすると、%s %z がなんでいけない理由はいまだに私にとって謎だなぁ。
少し違うかもしれないけど、
もっと基本的なパターンとして '%z' があって、
'%s %z' を受け入れる事になったら、次は '%z' だなって以前に思ったのを思い出した。
Felipe Contreras の主張だとこれも出来ないとバグでしょ。
彼は別に自分が困っててここに来てるわけじゃないからね。
DateTime.strptime ではこれは許さない事になって...
tadf (tadayoshi funaba)
12:00 PM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
tadayoshi funaba wrote:
>
> ...
関係あると思われないなら私の推測がまちがっていたのでしょう。
そうすると、%s %z がなんでいけない理由はいまだに私にとって謎だなぁ。
akr (Akira Tanaka)
10:52 AM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
> ここで興味の対象は "%s %z" がなぜいけないのか、という点です。
> ...
質問の意図が理解しきれていないかもしれませんが、望ましくはないと思います。
ただ、それと俺の判断に関係があるのかな。
> 読み飛ばすという使い方については私には関係性が見出せませんでした。
Date.strptime('Sun May 4 00:00:00 2014', '%a %b %d %T %Y')
これは典型的な日付ですが、田中さんのいう点を打つには ...
tadf (tadayoshi funaba)
10:12 AM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
tadayoshi funaba wrote:
> Akira Tanaka wrote:
> ...
うぅむ。期待したものとは違う方向で回答されてしまった気がします。
ここで興味の対象は "%s %z" がなぜいけないのか、という点です。
私の思ったのは、もし、ふなばさんが DateTime.strptime に与えるフォーマットに時刻 (時間軸上の点) を
同定するのに関係しない要素は与えるべきでない、と感じるとすれば、
フォーマットに "%s ...
akr (Akira Tanaka)
09:03 AM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
Nobuyoshi Nakada wrote:
> It doesn't seem there is absolute reason that you have to use `Time.strptime`.
Why wouldn't I? It does **exactly** what I want:
Time.strptime('0 +0100', '%s %z').strftime('%s %z')
=> "0 +0100"
...
felipec (Felipe Contreras)
08:50 AM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
Akira Tanaka wrote:
> tadayoshi funaba wrote:
> ...
極端な話、単に読み飛ばすだけでも意味があると思ってます。
`s = 'Sunday 4 May <unknown garbage> 2014; blob'
h = Date._strptime(s, '%a %d %b')
s2 = h[:leftover].gsub(/ *<.*> */, '')
h2 = Date._strptime(s2, ...
tadf (tadayoshi funaba)
08:06 AM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
It doesn't seem there is absolute reason that you have to use `Time.strptime`.
Particular methods feel more suitable, like `rfc2822`, `httpdate`, and `xml`.
~~~ruby
class Time
def self.git(s)
/\A(\d+)\s+([-+]\d\d)(\d\d)\z/ =...
nobu (Nobuyoshi Nakada)
06:58 AM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
tadayoshi funaba wrote:
>
> ...
はい。Time や DateTime のインターフェースで hour がないとかは許しがたいので、
なにかを選ばざるを得ないと思います。
> %s %z は「今x秒です」「オレ %z の時差で生活してます」という感じで
> ...
ふむ。これは示唆的です。
もしかして、DateTime.strptime に与えるフォーマットに時刻 (時間軸上の点) を同定するのに関係しない要素は与える...
akr (Akira Tanaka)
03:25 AM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
tadayoshi funaba wrote:
> /* Gr. strptime is crap for this; it doesn't have a way to require RFC2822
> ...
This has already been agreed: many options in strptime() are not portable, but that includes '%s' as well.
felipec (Felipe Contreras)
03:00 AM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
git は良く知らないんだけど、今、git-1.9.2 を見たところでは、
少なくとも現行の核で strptime は使ってないように見えます。
自前で解析して time_t 相当のものを組み立ててるようですね。
git-1.9.2/date.c から引用:
/* Gr. strptime is crap for this; it doesn't have a way to require RFC2822
(i.e. English) day/mon...
tadf (tadayoshi funaba)
02:54 AM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
Akira Tanaka wrote:
> tadayoshi funaba wrote:
> ...
しかし、それは Time の場合は自明である地方時、DateTime では UTC という事になっているし、そういう形式なんで仕方がないと思います。
そういう積極的でない時間帯の選択は俺は勝手に「匿名」と読んで許容しています。厳密にはそういうのを別に識別する仕掛けがあるほうがいいのでしょうが。
%s %z は「今x秒です」「オレ %z の時差で生活して...
tadf (tadayoshi funaba)
01:48 AM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
tadayoshi funaba wrote:
>
> ...
ちゃんと定義すればそういうことも可能なんじゃないかと思います。
年月日時分秒が2つ出てくるのでわかりにくいとは思いますが。
> 俺は今、日本にいてUTCの時刻を扱っているとします。
> ...
後で出てくる時間軸の話でいえば、
ISO 8601 でいえば 2001-02-03T04:05:06Z という名前をもつ時間軸上の点に
2001-02-03T04:05:06 UTC (+0900...
akr (Akira Tanaka)
11:31 PM Bug #6634: Deadlock with join and ConditionVariable
On Sat, May 3, 2014 at 8:45 AM, <nikkoara@hates.ms> wrote:
> Issue #6634 has been updated by L Nicoara.
>
>
> L Nicoara wrote:
>> nhm tanveeer hossain khan wrote:
>> > Hi there,
>> >
>> > I've faced similar problem with ruby 2....
kosaki (Motohiro KOSAKI)
08:56 PM Revision a72f9f34 (git): * ext/date/date_core.c (rt_rewrite_frags): a new feature (not a
bug fix) of strptime. applies offset even if the given date is
not local time (%s and %Q). This is an exceptional feature and
I do NOT recommend to use this at all. Thank you git community.
git-svn-id: svn+ssh://...
Tadayoshi Funaba
08:44 PM Feature #9799: change behavior of Math::atan2 if y and x are both Float::INFINITY
Marcus Stollsteimer wrote:
> Wait, wait...
> ...
I don't consider it wrong for a programming language. Maybe these special cases make less sense than the other ones, but they exist in many other languages. Even in numerical ones. That ...
cremno (cremno phobia)
04:05 PM Feature #9799: change behavior of Math::atan2 if y and x are both Float::INFINITY
Wait, wait...
So you introduce mathematically wrong behaviour with the argument that there already is some other wrong behaviour???
stomar (Marcus Stollsteimer)
02:14 AM Feature #9799: change behavior of Math::atan2 if y and x are both Float::INFINITY
I've searched for a rationale. It can be found in <http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf> on the bottom of page 188 (or real page 181):
>The specification of `atan2(∞,∞)` as `π/4` indicates the reasonable quad...
cremno (cremno phobia)
01:29 AM Feature #9799: change behavior of Math::atan2 if y and x are both Float::INFINITY
Yusuke Endoh wrote:
> Interesting. I'm not against the change since the proposed behavior looks prevailing, but I wonder if it is useful that the following case returns pi/4.
Yes, I wondered it too
But `Float::INFINITY == Float::IN...
nobu (Nobuyoshi Nakada)
01:23 AM Feature #9799 (Closed): change behavior of Math::atan2 if y and x are both Float::INFINITY
Applied in changeset r45805.
----------
math.c: C99-like atan2
* math.c (math_atan2): return values like as expected by C99 if
both two arguments are infinity. based on the patch by cremno
phobia <cremno AT mail.ru> in [ruby-core:...
nobu (Nobuyoshi Nakada)
12:55 AM Feature #9799: change behavior of Math::atan2 if y and x are both Float::INFINITY
Interesting. I'm not against the change since the proposed behavior looks prevailing, but I wonder if it is useful that the following case returns pi/4.
~~~ruby
x = Float::INFINITY
Math.atan2(x, 2 * x) #=> Math::PI/4, not Math.atan...
mame (Yusuke Endoh)
06:32 PM Feature #8667: Unable to set OpenSSL GCM iv_length in Ruby
Alternate patch which makes iv length changes implicit in iv= when using GCM.
This issue currently requires me to require a patched ruby for my software to run.
dwaite (David Waite)
06:31 PM Bug #9657: Segfault in bigdecimal/util.rb Float#to_d
Thanks chikanagasan and wanabesan! tiegz (Tieg Zaharia)
03:56 PM Bug #9657: Segfault in bigdecimal/util.rb Float#to_d
Thank you for notice this, wanabe san.
r45015 was backported into ruby_2_1 at r45815.
nagachika (Tomoyuki Chikanaga)
05:45 PM Bug #9743: memory leak in openssl ossl_pkey_verify leaks memory
r45595 was backported into ruby_2_1 at r45821. nagachika (Tomoyuki Chikanaga)
05:44 PM Revision 01cf2127 (git): merge revision(s) r45595: [Backport #9743] [Backport #9745]
* ext/openssl/ossl_pkey.c (ossl_pkey_verify): as EVP_VerifyFinal()
finalizes only a copy of the digest context, the context must be
cleaned up after initialization by EVP_MD_CTX_cleanup() or a
memory leak wi...
nagachika (Tomoyuki Chikanaga)
05:33 PM Bug #9599: Fiddle::Function#call leaks memory
r45291, r45299, r45314 and r45325 were backported into ruby_2_1 at 45820. nagachika (Tomoyuki Chikanaga)
05:32 PM Revision acd893d1 (git): merge revision(s) r45291,r45299,r45314,r45325: [Backport #9518]
* ext/dl/cptr.c (dlptr_free), ext/dl/handle.c (dlhandle_free),
ext/fiddle/handle.c (fiddle_handle_free),
ext/fiddle/pointer.c (fiddle_ptr_free): fix memory leak.
based on the patch Heesob Park at [ruby-dev:4...
nagachika (Tomoyuki Chikanaga)
05:19 PM Revision 647b55f6 (git): merge revision(s) r45298,r45311: [Backport #9518]
test/ruby/envutil.rb: compare RSS to check memory leak
* test/ruby/envutil.rb (Test::Test#assert_no_memory_leak): compare
also RSS if available.
* test/ruby/memory_status.rb (Memory::Status.parse): read string
form ...
nagachika (Tomoyuki Chikanaga)
04:28 PM Bug #9518: Objects in large arrays are leaked
r45638 was backported into ruby_2_1 at r45818.
according to #9796
nagachika (Tomoyuki Chikanaga)
04:26 PM Revision cd705d11 (git): merge revision(s) r45638: [Backport #9518]
* gc.c (rb_gc_writebarrier): drop special case for big hash/array
[Bug #9518]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nagachika (Tomoyuki Chikanaga)
04:18 PM Bug #9687: Make a cap for malloc_limit adjustment
r45468 was backported into ruby_2_1 branch at r45817. nagachika (Tomoyuki Chikanaga)
04:17 PM Revision ac0f8d80 (git): merge revision(s) r45468: [Backport #9687]
* gc.c (gc_before_sweep): cap `malloc_limit' to
gc_params.malloc_limit_max. It can grow and grow with such case:
`loop{"a" * (1024 ** 2)}'
[Bug #9687]
This issue is pointed by Tim Robertson.
...
nagachika (Tomoyuki Chikanaga)
03:57 PM Revision d9087ffe (git): update a comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
03:55 PM Revision efae6ae3 (git): merge revision(s) r45015: [Backport #9657]
* ext/bigdecimal/bigdecimal.c (BigDecimal_initialize): Insert GC guard.
* ext/bigdecimal/bigdecimal.c (BigDecimal_global_new): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45815 b2dd03c8-39d4-4d8f-98ff-...
nagachika (Tomoyuki Chikanaga)
03:51 PM Revision e1fefb28 (git): * 2014-05-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
03:51 PM Revision 0b53b86d (git): add comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
03:45 PM Revision 1dcdd256 (git): merge revision(s) r45453,r45455,r45577: [Backport #9798]
* ext/psych/lib/psych.rb: Merge psych-2.0.5. bump version to
libyaml-0.1.6 for CVE-2014-2525.
* ext/psych/yaml/config.h: ditto.
* ext/psych/yaml/scanner.c: ditto.
* ext/psych/yaml/yaml_private.h: ditt...
nagachika (Tomoyuki Chikanaga)
03:40 PM Revision 7c89c508 (git): merge revision(s) r45221: [Backport #9798]
* ext/psych/lib/psych/visitors/yaml_tree.rb: support dumping Encoding
objects.
* ext/psych/lib/psych/visitors/to_ruby.rb: support loading Encoding
objects.
* test/psych/test_encoding.rb: add test
...
nagachika (Tomoyuki Chikanaga)
03:17 PM Revision 71fdd26d (git): merge revision(s) r45393: [Backport #9668]
* gc.c: Fix up default GC params by @csfrancis [fix GH-556]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nagachika (Tomoyuki Chikanaga)
01:04 PM Revision 40c6eaf6 (git): vm.c: Init_vm_objects
* vm.c (Init_vm_objects): initialize VM internal objects, after
heap initialized.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
11:52 AM Revision fffbcf28 (git): * lib/time.rb (Time.force_zone!): Use usual local time if it has
expected offset from UTC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
akr (Akira Tanaka)
09:01 AM Revision a18177d5 (git): * lib/time.rb (Time.force_zone!): New private method.
(Time.make_time): Use Time.force_zone!.
(Time.strptime): Ditto.
(Time.rfc2822): Ditto.
(Time.xmlschema): Ditto.
* lib/rss/rss.rb (Time.w3cdtf): Use Time.force_zone!.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45807 b2dd0...
akr (Akira Tanaka)
02:41 AM Revision d64eef15 (git): * math.c (math_atan2): remove the condition for test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
01:23 AM Revision 7a6ebecf (git): math.c: C99-like atan2
* math.c (math_atan2): return values like as expected by C99 if
both two arguments are infinity. based on the patch by cremno
phobia <cremno AT mail.ru> in [ruby-core:62310]. [Feature #9799]
git-svn-id: svn+ssh://ci.ruby-lang.org/...
nobu (Nobuyoshi Nakada)

05/03/2014

11:41 PM Revision 6e342592 (git): test_math.rb: rename check as assert_float
* test/ruby/test_math.rb (assert_float): rename with `assert_`
prefix so that the caller frame would appear in backtraces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
09:32 PM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
It don't understand the details of the discussion, but it seems to me Tadayoshi is arguing that dates cannot be represented correctly in "%s %z".
If that was the case why did Git chose it as the format to store dates? Shouldn't Git be...
felipec (Felipe Contreras)
09:18 PM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
Akira Tanaka wrote:
> tadayoshi funaba wrote:
> ...
問題があるとかでなく、別のものなってるという事です。
たとえば、可能性としては、UTCで書いた日付を地方時にという事も出来るという事ですよね。
今回 %s だけですが。
俺は今、日本にいてUTCの時刻を扱っているとします。
それを例えば以下のように記述する事にします。
与えられた時刻はUTCだけど、それを +09:00 で参照する事にします。
...
tadf (tadayoshi funaba)
01:00 PM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
tadayoshi funaba wrote:
>
> ...
はい。
> これの Sat を Fri 書き換えると間違った日付です。
はい。
"Fri May 3 00:00:00 2014" に書き換えると確かに間違っています。
> ...
曜日と年月日は独立ではないので、
片方を設定するともう一方も変化してしまう破壊的操作の列で設定を行うことをコマンド言語と表現しているのですよね。
これはわかります。
> 田中さんの説明からも...
akr (Akira Tanaka)
12:04 PM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
Akira Tanaka wrote:
> tadayoshi funaba wrote:
> ...
伝わらないのでちょっと別の話をします。
Date.today.ctime #=> "Sat May 3 00:00:00 2014"
これは普通の日付ですよね。
これの Sat を Fri 書き換えると間違った日付です。
たしか、php のライブラリだったと思うけど、こういうのを入力すると
2014-05-02 とか 2014-05-0...
tadf (tadayoshi funaba)
11:34 AM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
tadayoshi funaba wrote:
>
> ...
%s に UTC からの時差の情報が入っていないことに同意します。
しかし、Time オブジェクトを作るには時差 (あるいは地方時、UTC) を選ばないといけないので、
%z の情報を使ってもいいと思います。
> 田中さんはそこにオブジェクトを見てるから不自然とは感じないという事ですかね。
「そこにオブジェクトを見てる」というのがどのような意味なのかわかりません。
> ......
akr (Akira Tanaka)
10:29 AM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
Akira Tanaka wrote:
> tadayoshi funaba wrote:
> ...
見慣れないという意味ではないです。ユリウス日のようなものも日付だと思ってますし、%s 単体では特に問題に思っていません。
全然理解できないのですが、%s に時差って意味ないですよね。
田中さんはそこにオブジェクトを見てるから不自然とは感じないという事ですかね。
> もしそうだとすると、私はそのようには考えていません。
> ...
やっぱりおかしいで...
tadf (tadayoshi funaba)
09:58 AM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
tadayoshi funaba wrote:

> 日付としておかしいからです。
おかしい、というのはどういう意味でしょう?
たしかに "%s %z" は人間が日常的に扱う形式ではありません。
でも、%s が過去から未来への流れの中の 1点を指定し、
%z がその 1点の表現方法を UTC からの offset という形でを指定する、
という時刻の形式だと解釈できると思います。
時刻の表現として、(閏秒の話を除いて) とくに問題があるとは...
akr (Akira Tanaka)
09:11 AM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
At some point it would be nice to have something in English so that the international community can comment on that. felipec (Felipe Contreras)
09:06 AM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
Akira Tanaka wrote:
> tadayoshi funaba wrote:
> ...
日付としておかしいからです。
> Ruby の strptime は struct tm じゃなくて DateTime や Time のオブジェクトを生成し、
> ...
主張の根拠になっているのがバグだから直せだからです。
ruby 側の都合の話ではありません。
> %s と %z に対応する値を s と z として、
> ...
このあたりは...
tadf (tadayoshi funaba)
08:37 AM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
tadayoshi funaba wrote:
> 言語の問題もあるんだろうけど、俺が英語に堪能でも Felipe Contreras に俺の考えを解らせるのは無理じゃないかという気がする。
私も "%s %z" がなんでそんなにいけないのか理解していません。
> ...
Ruby の strptime は struct tm じゃなくて DateTime や Time のオブジェクトを生成し、
DateTime や Time のオブジェクトは自分がどん...
akr (Akira Tanaka)
06:45 AM Feature #9794 (Rejected): DateTime.strptime() doesn't work correctly for '%s %z'
tadf (tadayoshi funaba)
06:45 AM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
言語の問題もあるんだろうけど、俺が英語に堪能でも Felipe Contreras に俺の考えを解らせるのは無理じゃないかという気がする。
誤解のないよう少し補足しておくと、strcut tm で %s や %z を表現できない、という直接的な問題でもない。
C の時刻関数群はオブジェクト指向では書かれてないけど、データや関数の集合によってどんなモノを表現しているのか
考えないと理解できない。C の時刻関数には、まず、地方時 (あるいは局所時) と世界時の区別...
tadf (tadayoshi funaba)
03:42 AM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
Ryan Davis wrote:
> I'd like to see this escalated to a neutral 3rd party (matz? ko1?) that can evaluate Charlie's code and weigh it against tadf's Japanese argument. Regardless of any final outcome, adding an English explanation would ...
felipec (Felipe Contreras)
06:47 PM Revision ca7c0fee (git): [DOC]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
06:47 PM Revision 5de24423 (git): * lib/time.rb (Time.httpdate): Always return a UTC Time object.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
06:37 PM Misc #9801: Regexp documentation for Regexp::EXTENDED is incomplete
I have submitted a pull request on GitHub to make this easier. (Before, I didn't know I could!)
https://github.com/ruby/ruby/pull/606
allolex (Damon Davison)
02:48 PM Misc #9801 (Closed): Regexp documentation for Regexp::EXTENDED is incomplete
The documentation for Regexp::EXTENDED, i.e. the `x` flag says that when it is used, Regexp will ignore all whitespace in the pattern. This is not completely true.
All whitespace is ignored, except for whitespace which has been escape...
allolex (Damon Davison)
06:27 PM Revision 7a39fcc1 (git): * lib/time.rb (Time.make_time): Refactored.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
06:11 PM Revision af56a2b6 (git): * lib/time.rb (Time.rfc2822): Fix year completion.
Produce fixed-offset time object if appropriate.
(Time.xmlschema): Produce fixed-offset time object if appropriate.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
akr (Akira Tanaka)
05:01 PM Feature #9508 (Feedback): Add method coverage and branch coverage metrics
Sorry for the very late response. I tried and read through your patch.
However, at first, I'd like to discuss the proposal itself.
## Demand
In fact, I think we can virtually implement this feature by using a Ruby code parser, ...
mame (Yusuke Endoh)
03:35 PM Bug #5659: bug releasing a gem created with rails 3.1
@vincius do you get this error on the latest release? I can't reproduce it on any of the machines I've got handy. samkottler (Sam Kottler)
03:23 PM Revision f5c91e57 (git): * 2014-05-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
03:23 PM Revision c4f29a65 (git): * lib/time.rb (make_time): Produce fixed-offset time object if
appropriate.
(Time.strptime): Use d[:zone] instead of d[:offset].
* lib/rss/rss.rb (Time.w3cdtf): Produce fixed-offset time object if
appropriate.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45798 b2dd03c8-39d4-4d8f-98ff-82...
akr (Akira Tanaka)
01:09 PM Revision 0a76ec34 (git): add tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
12:45 PM Bug #6634: Deadlock with join and ConditionVariable
L Nicoara wrote:
> nhm tanveeer hossain khan wrote:
> ...
For the record, the test case is malformed. Bummer. I think the one I based it on (from khan) is malformed as well. My apologies if you spent time on it.
nikkoara (L Nicoara)
11:31 AM Revision 4de23866 (git): * lib/time.rb (Time.strptime): Use d[:offset] if d[:seconds] is not
given.
Reported by tadayoshi funaba. [ruby-core:62322]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
akr (Akira Tanaka)
10:07 AM Bug #9677: OpenSSL::PKey::EC#to_text causes a segmentation fault
It's worth noting that this segfault happens on not only arch, but also OSX, debian, and fedora. That makes it seem like a generic issue which is not isolated to arch. samkottler (Sam Kottler)
10:05 AM Bug #9677: OpenSSL::PKey::EC#to_text causes a segmentation fault
Thanks for the report! I'm looking into this now. samkottler (Sam Kottler)
05:56 AM Bug #9800 (Closed): Ship 2.1.2 with GC_HEAP_OLDOBJECT_LIMIT_FACTOR of 1.3
Many users are complaining about memory bloat in 2.1 series of Ruby
As denoted in https://bugs.ruby-lang.org/issues/9607 there is an excellent plan by ko1 to address this.
In the mean time I suggest we reduce GC_HEAP_OLDOBJECT_LIM...
sam.saffron (Sam Saffron)
05:28 AM Bug #9797 (Closed): Math::log - missing domain error check
Applied in changeset r45795.
----------
math.c: check domain of base argument
* math.c (math_log): check domain of base argument too. raises
Math::DomainError instead of returning NaN if the base is less
than 0, and returns NaN in...
nobu (Nobuyoshi Nakada)
02:40 AM Bug #9797 (Closed): Math::log - missing domain error check
`Math::log` with a negative `base` should raise a `Math::DomainError`.
~~~ruby
Math.log(-1.0) # raises Math::DomainError
Math.log( 1.0, -1.0) # doesn't (but calls `log(-1.0)` internally!)
~~~
cremno (cremno phobia)
05:28 AM Revision 38656e24 (git): math.c: check domain of base argument
* math.c (math_log): check domain of base argument too. raises
Math::DomainError instead of returning NaN if the base is less
than 0, and returns NaN instead of -infinity if both of two
arguments are 0. [ruby-core:62309] [Bug #97...
nobu (Nobuyoshi Nakada)
05:28 AM Revision 1fd4c7f1 (git): math.c: adjust prototype of math_log
* math.c (math_log): adjust prototype as method function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
03:16 AM Feature #9799 (Closed): change behavior of Math::atan2 if y and x are both Float::INFINITY
The current behavior when y and x are either negative or positive infinity is:
~~~ruby
Math.atan2(Float::INFINITY, Float::INFINITY) # raises Math::DomainError
~~~
The attached diff changes it to:
~~~ruby
Math.atan2(Float::IN...
cremno (cremno phobia)
12:54 AM Bug #9742: Error when trying to debug line with "startDate = Time.parse('2014-Apr-01 12:00:30')"
Ask debugger gem developers. nobu (Nobuyoshi Nakada)

05/02/2014

11:58 PM Feature #9772: IO#statfs and File::Statfs
Yui NARUSE wrote:
> statfs では f_type の類がとれないからですね。[ruby-core:62150]
なるほど。
では、IO#statfs では f_type の類は必須で、
f_type の類が提供されない環境では statvfs があっても
IO#statfs は提供しないということでしょうか?
> ...
OpenBSD 5.5 が出たので記念にインストールして試してみたところ、コンパイルできない感じで...
akr (Akira Tanaka)
03:29 PM Feature #9772: IO#statfs and File::Statfs
r45790 にて、File::Statfs#fstypename を AIX, HP-UX, Solaris でも使えるようにしてみました。(ただし動作確認は Solaris のみ。)
struct statvfs.f_basetype を struct statfs.f_fstypename の代替として使用しています。
ngoto (Naohisa Goto)
11:27 PM Feature #9794 (Feedback): DateTime.strptime() doesn't work correctly for '%s %z'
Felipe's rudeness, while not acceptable, is borne out of frustration. I suspect that frustration exists on both sides of this argument. Setting that aside for a moment, and evaluating only the **facts** stated (and not the tone) in [[htt... zenspider (Ryan Davis)
09:55 PM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
Felipe, your extreme rudeness has no place here.
The rejection reason is described in #7445 as linked.
Not every committer is proficient in English so Japanese is just fine.
I don't suspect you'll get a reason.
drbrain (Eric Hodel)
08:32 PM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
English. This is an international project, isn't it?
Time.strptime('2001 -0900', '%Y %z')
This is clearly a red herring. If you want to fix '%Y %z', go ahead, that's no reason not to fix '%s %z'.
felipec (Felipe Contreras)
11:53 AM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
何回も言うけどCで自分の意図どおりに扱えてるっていうあんたの主張は間違ってる。
ある実装では構文的に解析出来てるかもしれないけど、意味を解釈する事は仕様上無理なんだよ。どう解釈しても。
あんたは都合よく仕様の話と実装の話をつなげて自分の主張にしてるだけなの。
俺はそれなりに妥当な解釈で拡張してるわけでバグだから直せと頭ごなしに言われる筋合いはない。
time に従えって言いたいのかもしれないけど、現状はこんなんなんだけど
~~~ruby
Time.s...
tadf (tadayoshi funaba)
11:14 AM Feature #9794: DateTime.strptime() doesn't work correctly for '%s %z'
Tadayoshi you are so fucking ridiculous it's not even funny.
You reject a perfectly sensible patch that **EVERYBODY** agrees with for NO REASON AT ALL WHATSOEVER? At the very list give a reason.
I'm amazed that anybody would make y...
felipec (Felipe Contreras)
10:59 AM Feature #9794 (Rejected): DateTime.strptime() doesn't work correctly for '%s %z'
identical to 7445.
tadf (tadayoshi funaba)
10:53 AM Feature #9794 (Assigned): DateTime.strptime() doesn't work correctly for '%s %z'
tadf (tadayoshi funaba)
10:21 AM Feature #9794 (Closed): DateTime.strptime() doesn't work correctly for '%s %z'
Time.strptime() works correctly:
Time.strptime('0 +0100', '%s %z').strftime('%s %z')
=> "0 +0100"
But DateTime.strptime() doesn't:
DateTime.strptime('0 +0100', '%s %z').strftime('%s %z')
=> "0 +0000"
In Rubi...
felipec (Felipe Contreras)
11:15 PM Bug #9795 (Feedback): ruby-head breaks spreadsheet gem
Symbol GC has been introduced at r45426, Mar 26, and just fixed some attrset ID bugs these days.
Try with the latest trunk.
nobu (Nobuyoshi Nakada)
08:28 PM Bug #9795 (Closed): ruby-head breaks spreadsheet gem
When Zeno commit a comment with https://github.com/zdavatz/spreadsheet/commit/9b08dceecf634139f819d1f9dcd0dbcdf10b4dbd on Wed Apr 2 19:00:32 2014 +0200
Our travis-ci build https://travis-ci.org/zdavatz/spreadsheet/builds/22119822 failed...
ngiger (Niklaus Giger)
07:21 PM Bug #9608 (Closed): [PATCH] avoid large alloca on Complex/Rational calls
Applied in changeset r45793.
----------
avoid large alloca on Complex/Rational calls
* complex.c (parse_comp): replace ALLOCA_N with ALLOCV_N/ALLOCV_END
[Bug #9608]
* rational.c (read_digits): ditto
Anonymous
11:29 AM Bug #9608: [PATCH] avoid large alloca on Complex/Rational calls
i'd like to try it; please commit it. tadf (tadayoshi funaba)
07:21 PM Revision a9befcdb (git): avoid large alloca on Complex/Rational calls
* complex.c (parse_comp): replace ALLOCA_N with ALLOCV_N/ALLOCV_END
[Bug #9608]
* rational.c (read_digits): ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Eric Wong
06:43 PM Revision 0989529f (git): time.c: fix underflow of unsigned integers
* time.c (vtm_add_offset): get rid of underflow of unsigned
integers. fix up r45155.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
05:35 PM Misc #9741 (Assigned): Policy for Posting Security & General Announcements on www.ruby-lang.org
I'm glad we settled on a clear policy for this, I'll draft up a wiki page which explains it. zzak (zzak _)
06:59 AM Misc #9741 (Closed): Policy for Posting Security & General Announcements on www.ruby-lang.org
We discussed this issue on https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20140418Japan .
* known issues: get consensus of github & w.r-l.o reviewers
* unknown issues: get consensus on ruby-core/security@ members + ...
hsbt (Hiroshi SHIBATA)
03:24 PM Revision 9621f8a9 (git): * 2014-05-03
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
03:24 PM Revision 09f51c56 (git): * file.c (HAVE_STRUCT_STATVFS_F_BASETYPE): File::Statfs#fstypename
is supported on AIX, HP-UX, and Solaris, by using the value of
struct statvfs.f_basetype.
* configure.in (HAVE_STRUCT_STATVFS_F_BASETYPE): check struct
statvfs.f_basetype which is available on AIX, HP-UX, and Solaris.
git-svn-id: s...
ngoto (Naohisa Goto)
03:02 PM Feature #9781: Feature Proposal: Method#super_method
Ryan, using `superclass` gets you really close, but doesn't handle extending object instances:
```ruby
class BigFoo
def bar
end
end
class Foo < BigFoo
def bar
super
end
end
class Object
def super_method na...
schneems (Richard Schneeman)
08:47 AM Feature #9781: Feature Proposal: Method#super_method
Maybe I'm still not getting something. If you can call it (or super to it) you can grab it:
~~~ruby
class BigFoo
def bar
end
end
class Middle1 < BigFoo; end
class Middle2 < Middle1; end
class Middle3 < Middle2; end
class...
zenspider (Ryan Davis)
03:14 AM Feature #9781: Feature Proposal: Method#super_method
I must be tired.
Nobu: Sorry, I was confused, there's no problem with `UnboundMethod#super_method` because we retain which class this method was accessed from.
Ryan: That's actually a good example, there is no api to get the "origi...
marcandre (Marc-Andre Lafortune)
03:03 AM Feature #9781: Feature Proposal: Method#super_method
Nobuyoshi Nakada wrote:
> It's an ordinary `Method` (or `UnboundMethod`) instance, same as `SuperClass.instance_method(:foo).bind(obj)`.
Agreed for `Method`, but I'm not sure I understand how we could define `UnboundMethod#super_meth...
marcandre (Marc-Andre Lafortune)
02:43 AM Feature #9781: Feature Proposal: Method#super_method
Hi,
Ryan Davis wrote:
> Maybe it is just me misunderstanding something... but this doesn't seem that complicated. I don't understand why you'd walk through the ancestors when you just just ask one level up:
For one level, with sim...
marcandre (Marc-Andre Lafortune)
01:35 PM Revision 1388beb1 (git): [DOC]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
12:04 PM Revision b1520b74 (git): parse.y: fix wrong static symbol
* parse.y (next_id): no reason to set ID_STATIC_SYM here, as ID
returned by rb_intern3 can be a dynamic symbol and the static
symbol flag is set otherwise. [Bug #9787]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45788 b2dd03c...
nobu (Nobuyoshi Nakada)
11:32 AM Feature #9513 (Assigned): Hide Rational internal
i'm ok.
tadf (tadayoshi funaba)
07:40 AM Bug #9661 (Closed): CSV Header Conversion Causes NoMethodError For Empty Headers
https://github.com/ruby/ruby/pull/575 is already closed. hsbt (Hiroshi SHIBATA)
07:34 AM Bug #9720 (Closed): [Doc] Proofreading of Net::IMAP docs
Applied in changeset r45787.
----------
* lib/net/imap.rb: Proofreading docs. [ruby-core:61931][Bug #9720]
hsbt (Hiroshi SHIBATA)
07:34 AM Revision 3fb8542b (git): * lib/net/imap.rb: Proofreading docs. [ruby-core:61931][Bug #9720]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e hsbt (Hiroshi SHIBATA)
07:25 AM Bug #9738 (Closed): A document fix for Rinda::TupleEntry#renew
Applied in changeset r45786.
----------
* lib/rinda/tuplespace.rb: fix document. [ruby-core:62003][Bug #9738]
hsbt (Hiroshi SHIBATA)
07:25 AM Revision ba0002a9 (git): * lib/rinda/tuplespace.rb: fix document. [ruby-core:62003][Bug #9738]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e hsbt (Hiroshi SHIBATA)
06:51 AM Bug #9742 (Closed): Error when trying to debug line with "startDate = Time.parse('2014-Apr-01 12:00:30')"
hsbt (Hiroshi SHIBATA)
04:43 AM Bug #9792: Segmentation fault while running jekyll serve with ruby installed by homebrew
You should ask `rvm` developers. nobu (Nobuyoshi Nakada)
03:47 AM Feature #9785: Feature Proposal: Dir.chdir Thread Safety
And if you want to discard output from the child process:
~~~ruby
system(command, *args, chdir: dir, out: IO::NULL) # discard stdout only
system(command, *args, chdir: dir, out: IO::NULL, err: [:child, :out]) # also stderr
~~~
nobu (Nobuyoshi Nakada)
03:26 AM Revision 29a2fe12 (git): mkmf.rb: no messages unless needed
* lib/mkmf.rb (create_makefile): no library scripts to install, no
installing messages.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
03:21 AM Bug #9789: Error in TestIO#test_seek_symwhence and TestIO#test_seek on systems without File::Statfs#type (e.g. Solaris)
このパッチで、テストが通るようになりました。
何らかの原因でseekに失敗した時に、Procが呼ばれ、Solarisでは Statfs#type がNotImplementedError となり、(Failureではなく) Errorになる可能性は残ってはいますが、その機能自体が Feature #9772 の議論対象のため、結論を待ちます。
ngoto (Naohisa Goto)
02:33 AM Bug #9789 (Closed): Error in TestIO#test_seek_symwhence and TestIO#test_seek on systems without File::Statfs#type (e.g. Solaris)
Applied in changeset r45783.
----------
test_io.rb: defer f_type
* test/ruby/test_io.rb (test_seek, test_seek_symwhence): defer
File::Statfs#type call which may not be implemented, to mitigate
errors on platforms where SEEK_DATA is...
nobu (Nobuyoshi Nakada)
03:20 AM Revision ff99fd4d (git): parse.y: hide anonymous id
* parse.y (rb_id_attrset): should not reveal anonymous ID as an
instance variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
02:32 AM Revision d1c03755 (git): test_io.rb: defer f_type
* test/ruby/test_io.rb (test_seek, test_seek_symwhence): defer
File::Statfs#type call which may not be implemented, to mitigate
errors on platforms where SEEK_DATA is available but f_type in
struct statfs is not. [ruby-dev:48154] ...
nobu (Nobuyoshi Nakada)
01:37 AM Revision d42e0ea8 (git): parse.y: turn dynamically interned Symbol into an ID
* parse.y (rb_id_attrset): turn dynamically interned Symbol into
an ID, since rb_str_dynamic_intern returns a Symbol but not an
ID. [ruby-core:62226] [Bug #9787]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45782 b2dd03c8-39d4...
nobu (Nobuyoshi Nakada)
01:34 AM Revision 5c58bb9f (git): * 2014-05-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
01:34 AM Revision 38fd0dc6 (git): symbol/type.c: bug_pindown
* ext/-test-/symbol/type.c (bug_pindown): method for debug, which
pins down the given symbol.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
01:34 AM Revision a80b3004 (git): symbol/type.c: bug_static_p bug_dynamic_p
* ext/-test-/symbol/type.c (bug_static_p, bug_dynamic_p): methods
for debug, which predicate the given symbol type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
12:56 AM Bug #9793 (Third Party's Issue): package "thread" is missed on http://www.ruby-doc.org/stdlib-2.1.1/ and also 2.1.0
http://www.ruby-doc.org isn't our resources. Please contact ruby-doc.org maintainers. hsbt (Hiroshi SHIBATA)
 

Also available in: Atom