[#46184] [ruby-trunk - Bug #7095][Open] Non-recursive marking — "authorNari (Narihiro Nakamura)" <authorNari@...>
6 messages
2012/10/01
[#46189] [ruby-trunk - Bug #7100][Open] WEBrick::HTTPServer.new で BindAddress を指定しない場合に必ず警告が記録される — "sho-h (Sho Hashimoto)" <sho-h@...>
5 messages
2012/10/02
[#46203] [ruby-trunk - Bug #7111][Open] New build option to enable/disable global method caching — "shugo (Shugo Maeda)" <redmine@...>
5 messages
2012/10/06
[#46258] [ANN] 2.0.0 feature freeze — Yusuke Endoh <mame@...>
Japanese later; 日本語は後で
5 messages
2012/10/24
[#46309] [ruby-trunk - Bug #2154][Assigned] filesystem encoding of UNIX — "usa (Usaku NAKAMURA)" <usa@...>
13 messages
2012/10/29
[#46310] Re: [ruby-trunk - Bug #2154][Assigned] filesystem encoding of UNIX
— Tanaka Akira <akr@...>
2012/10/29
2012年10月29日 10:31 usa (Usaku NAKAMURA) <usa@garbagecollect.jp>:
[#46366] Re: [ruby-trunk - Bug #2154][Assigned] filesystem encoding of UNIX
— "U.Nakamura" <usa@...>
2012/11/02
こんにちは、なかむら(う)です。
[#46375] Re: [ruby-trunk - Bug #2154][Assigned] filesystem encoding of UNIX
— KOSAKI Motohiro <kosaki.motohiro@...>
2012/11/02
>> とくに指定しなければ、default external は locale から設定されるので、
[#46376] Re: [ruby-trunk - Bug #2154][Assigned] filesystem encoding of UNIX
— Urabe Shyouhei <shyouhei@...>
2012/11/02
On 11/02/2012 01:56 PM, KOSAKI Motohiro wrote:
[#46396] Re: [ruby-trunk - Bug #2154][Assigned] filesystem encoding of UNIX
— "U.Nakamura" <usa@...>
2012/11/05
こんにちは、なかむら(う)です。
[ruby-dev:46249] [Backport93 - Backport #5586] Time.at(Marshal.load(Marshal.dump(Time.now))).to_s raise TypeError
From:
"dafiku (dafi harisy)" <dafi@...>
Date:
2012-10-23 05:31:27 UTC
List:
ruby-dev #46249
Issue #5586 has been updated by dafiku (dafi harisy).
Everlastingly, an issue with the intention of I am passionate in this vicinity. I be inflicted with looked for in rank of this feature for the last numerous hours. Your locate is greatly valued.
http://www.yourhousecontents.com/
http://www.electroscanogram.com/
http://www.videophototravel.info/
http://www.supershinelaundry.com/
http://www.ywor.info/
http://www.bicity.info/
http://www.ubidyne.info/
----------------------------------------
Backport #5586: Time.at(Marshal.load(Marshal.dump(Time.now))).to_s raise TypeError
https://bugs.ruby-lang.org/issues/5586#change-31322
Author: nagachika (Tomoyuki Chikanaga)
Status: Closed
Priority: Normal
Assignee:
Category:
Target version:
以下のコードが TypeError を発生させます。なお 1.9.2-p312 でも発生しました。
Time.at(Marshal.load(Marshal.dump(Time.now))).to_s
# => TypeError: false can't be coerced into Fixnum
Time オブジェクトを Marshal.dump -> load すると TIME_SET_FIXOFF() で
struct time_object の gmt と vtm.utc_offset がセットされるのですが
それを Time.at に渡すと gmt だけコピーされて vtm.utc_offset が (VALUE)0 = Qfalse のままだからのようです。
どこが根本的な原因なのかよくわかりませんが、以下のパッチで例外はおきなくなりました。
るりまの Time.at(time) のページ( http://rurema.clear-code.com/1.9.3/method/Time/s/at.html )を見ると
「生成された Time オブジェクトのタイムゾーンは地方時となります。」とあるので TIME_GMT_COPY() 自体が
不要なのかもしれないと思いますがどうでしょう。
diff --git a/time.c b/time.c
index 3e50c7c..96b717b 100644
--- a/time.c
+++ b/time.c
@@ -1820,7 +1820,10 @@ struct time_object {
(tobj)->vtm.utc_offset = (off), \
(tobj)->vtm.zone = NULL)
-#define TIME_COPY_GMT(tobj1, tobj2) ((tobj1)->gmt = (tobj2)->gmt)
+#define TIME_COPY_GMT(tobj1, tobj2) \
+ ((tobj1)->gmt = (tobj2)->gmt, \
+ (tobj1)->vtm.utc_offset = (tobj2)->vtm.utc_offset, \
+ (tobj1)->vtm.zone = (tobj2)->vtm.zone)
static VALUE time_get_tm(VALUE, struct time_object *);
#define MAKE_TM(time, tobj) \
--
http://bugs.ruby-lang.org/