[#43610] Re: [ruby-list:48149] Re: requireが配列を取れたら便利だと思うんだけど.. — Hiroshi Nakamura <nakahiro@...>

cnVieS1saXN0GyRCJCskaTt9JEMkRk1oJF4kNyQ/ISMkRyRiQjMkKyRKJD0kJiEjGyhCCgoyMDEx

12 messages 2011/06/02

[#43643] DateTime.new! and DateTime.jd — Aaron Patterson <aaron.patterson@...>

こんにちは、アーロンです。

25 messages 2011/06/07
[#43647] Re: DateTime.new! and DateTime.jd — Tadayoshi Funaba <tadf@...> 2011/06/07

blocker はお前だろ。

[#43648] Re: DateTime.new! and DateTime.jd — Yukihiro Matsumoto <matz@...> 2011/06/07

まつもと ゆきひろです

[#43651] Re: DateTime.new! and DateTime.jd — Tadayoshi Funaba <tadf@...> 2011/06/07

> うーん、ただでさえ日英のコミュニケーション障壁があるのに、よ

[#43653] Re: DateTime.new! and DateTime.jd — Aaron Patterson <aaron.patterson@...> 2011/06/07

2011/6/7 Tadayoshi Funaba <[email protected]>:

[#43657] Re: DateTime.new! and DateTime.jd — Tadayoshi Funaba <tadf@...> 2011/06/07

皆さんってのに俺は入ってないみたいだな。

[#43661] Re: DateTime.new! and DateTime.jd — Yukihiro Matsumoto <matz@...> 2011/06/07

まつもと ゆきひろです

[#43662] Re: DateTime.new! and DateTime.jd — Tadayoshi Funaba <tadf@...> 2011/06/07

> Aaronが言ってる「リリース」は1.9.3のことだと思いますよ。

[#43645] Re: [ruby-core:36778] Re: 1.8.7 release next month — Urabe Shyouhei <shyouhei@...>

Moving to ruby-dev to understand strategies of backporting the Tk

13 messages 2011/06/07

[#43787] [Ruby 1.9 - Feature #4878][Open] CMath に frexp, ldexp, hypot の3関数は不要ではないか — Kenta Murata <muraken@...>

24 messages 2011/06/13
[#43788] Re: [Ruby 1.9 - Feature #4878][Open] CMath に frexp, ldexp, hypot の3関数は不要ではないか — Yukihiro Matsumoto <matz@...> 2011/06/13

まつもと ゆきひろです

[#43789] Re: [Ruby 1.9 - Feature #4878][Open] CMath に frexp, ldexp, hypot の3関数は不要ではないか — Tadayoshi Funaba <tadf@...> 2011/06/13

もう結論が出てしまったようですが、これは、元々 lib/complex.rb にあった

[#43794] Re: [Ruby 1.9 - Feature #4878][Open] CMath に frexp, ldexp, hypot の3関数は不要ではないか — Kenta Murata <muraken@...> 2011/06/13

=E3=82=80=E3=82=89=E3=81=9F=E3=81=A7=E3=81=99=E3=80=82

[#43795] Re: [Ruby 1.9 - Feature #4878][Open] CMath に frexp, ldexp, hypot の3関数は不要ではないか — Tadayoshi Funaba <tadf@...> 2011/06/13

> complex.rb をロードすると Math が CMath 相当に置き換わりますから、

[#43797] Re: [Ruby 1.9 - Feature #4878][Open] CMath に frexp, ldexp, hypot の3関数は不要ではないか — Kenta Murata <muraken@...> 2011/06/14

=E3=82=80=E3=82=89=E3=81=9F=E3=81=A7=E3=81=99=E3=80=82

[#43799] Re: [Ruby 1.9 - Feature #4878][Open] CMath に frexp, ldexp, hypot の3関数は不要ではないか — Yukihiro Matsumoto <matz@...> 2011/06/14

まつもと ゆきひろです

[#43800] Re: [Ruby 1.9 - Feature #4878][Open] CMath に frexp, ldexp, hypot の3関数は不要ではないか — Kenta Murata <muraken@...> 2011/06/14

=E3=82=80=E3=82=89=E3=81=9F=E3=81=A7=E3=81=99=E3=80=82

[#43803] Re: [Ruby 1.9 - Feature #4878][Open] CMath に frexp, ldexp, hypot の3関数は不要ではないか — Tadayoshi Funaba <tadf@...> 2011/06/14

> これに相当する事をやっているのが complex.rb なので、

[#43806] Re: [Ruby 1.9 - Feature #4878][Open] CMath に frexp, ldexp, hypot の3関数は不要ではないか — Yusuke ENDOH <mame@...> 2011/06/14

遠藤です。

[#43807] Re: [Ruby 1.9 - Feature #4878][Open] CMath に frexp, ldexp, hypot の3関数は不要ではないか — Tadayoshi Funaba <tadf@...> 2011/06/14

> 定義域を増やすだけにしよう、ということですよね。賛成です。

[#43809] Re: [Ruby 1.9 - Feature #4878][Open] CMath に frexp, ldexp, hypot の3関数は不要ではないか — Yusuke ENDOH <mame@...> 2011/06/14

2011年6月14日22:17 Tadayoshi Funaba <[email protected]>:

[#43810] Re: [Ruby 1.9 - Feature #4878][Open] CMath に frexp, ldexp, hypot の3関数は不要ではないか — Tadayoshi Funaba <tadf@...> 2011/06/14

> 互換性がないという点では同じ話だと思うのですが……。

[#43811] Re: [Ruby 1.9 - Feature #4878][Open] CMath に frexp, ldexp, hypot の3関数は不要ではないか — Yusuke ENDOH <mame@...> 2011/06/14

2011年6月14日23:02 Tadayoshi Funaba <[email protected]>:

[#43812] Re: [Ruby 1.9 - Feature #4878][Open] CMath に frexp, ldexp, hypot の3関数は不要ではないか — Tadayoshi Funaba <tadf@...> 2011/06/14

> いやあ、5 月末の feature freeze 時点では -2 を返していたはずなんですが、

[#43852] [Ruby 1.9 - Bug #4909][Open] trapハンドラは再入されてはいけないのではないか? — Motohiro KOSAKI <kosaki.motohiro@...>

11 messages 2011/06/20

[ruby-dev:43871] [Ruby 1.9 - Bug #4919] OpenSSL::SSL::Sesssion#time= に Bignum を渡すと ArgumentError が発生する

From: Martin Bosslet <Martin.Bosslet@...>
Date: 2011-06-22 08:59:56 UTC
List: ruby-dev #43871
Issue #4919 has been updated by Martin Bosslet.


I get the same result for OpenSSL 0.9.8k plus an additional error when running

  make test-all -TESTS="openssl" 

on revision 32199.

1) Error:
test_connect_and_close(OpenSSL::TestSSL):
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read finished A: sslv3 alert illegal parameter
    /home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/test_ssl.rb:46:in `connect'
    /home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/test_ssl.rb:46:in `block in test_connect_and_close'
    /home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/utils.rb:280:in `call'
    /home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/utils.rb:280:in `start_server'
    /home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/test_ssl.rb:35:in `test_connect_and_close'

  2) Error:
test_session(OpenSSL::TestSSLSession):
ArgumentError: unknown type
    /home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/test_ssl_session.rb:21:in `time='
    /home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/test_ssl_session.rb:21:in `block in test_session'
    /home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/utils.rb:280:in `call'
    /home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/utils.rb:280:in `start_server'
    /home/martin/Projekte/Ruby/ruby-svn/ruby/test/openssl/test_ssl_session.rb:7:in `test_session'

The latter can be solved by Tomoyuki's suggested fix.

Two questions: 
1) Is it OK if I apply the fix?
2) Anyone else getting the "sslv3 alert illegal parameter"? I get it most of the time but not always...

Regards,
Martin
----------------------------------------
Bug #4919: OpenSSL::SSL::Sesssion#time= に Bignum を渡すと ArgumentError が発生する
http://redmine.ruby-lang.org/issues/4919

Author: Tomoyuki Chikanaga
Status: Open
Priority: Normal
Assignee: 
Category: ext
Target version: 1.9.2
ruby -v: ruby 1.9.3dev (2011-06-22 trunk 32198) [i686-linux]


掲題のような理由で make test-all TESTS="-v openssl/test_ssl_session.rb" を実行すると 1E になります。

  1) Error:
test_session(OpenSSL::TestSSLSession):
ArgumentError: unknown type
    /opt/ruby-trunk/src/ruby/test/openssl/test_ssl_session.rb:21:in `time='
    /opt/ruby-trunk/src/ruby/test/openssl/test_ssl_session.rb:21:in `block in test_session'
    /opt/ruby-trunk/src/ruby/test/openssl/utils.rb:280:in `call'
    /opt/ruby-trunk/src/ruby/test/openssl/utils.rb:280:in `start_server'
    /opt/ruby-trunk/src/ruby/test/openssl/test_ssl_session.rb:7:in `test_session'

32bit 版のため Time.now.to_i が Bignum になり、OpenSSL::SSL::Sesssion#time= がこれをエラーとして弾くようです。

とりあえず以下のように Bignum 受け付けるようにしてみたところテストのErrorは回避されました。

--- a/ext/openssl/ossl_ssl_session.c
+++ b/ext/openssl/ossl_ssl_session.c
@@ -149,7 +149,7 @@ static VALUE ossl_ssl_session_get_timeout(VALUE self)
                                                                              \
                if (rb_obj_is_instance_of(time_v, rb_cTime)) {                \
                        time_v = rb_funcall(time_v, rb_intern("to_i"), 0);    \
-               } else if (FIXNUM_P(time_v)) {                                \
+               } else if (FIXNUM_P(time_v) || TYPE(time_v) == T_BIGNUM) {     \
                        ;                                                     \
                } else {                                                      \
                        rb_raise(rb_eArgError, "unknown type");               \



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

In This Thread