ruby-changes:23827
From: tadf <ko1@a...>
Date: Sun, 3 Jun 2012 14:14:58 +0900 (JST)
Subject: [ruby-changes:23827] tadf:r35878 (trunk): * ext/date/date_core.c: checks whether the object is frozen or not.
tadf 2012-06-03 14:14:47 +0900 (Sun, 03 Jun 2012) New Revision: 35878 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35878 Log: * ext/date/date_core.c: checks whether the object is frozen or not. Modified files: trunk/ChangeLog trunk/ext/date/date_core.c Index: ChangeLog =================================================================== --- ChangeLog (revision 35877) +++ ChangeLog (revision 35878) @@ -1,3 +1,7 @@ +Sun Jun 3 14:13:58 2012 Tadayoshi Funaba <tadf@d...> + + * ext/date/date_core.c: checks whether the object is frozen or not. + Sun Jun 3 14:00:51 2012 Tadayoshi Funaba <tadf@d...> * complex.c: wrote Complex#_dump and Complex::load. But now Index: ext/date/date_core.c =================================================================== --- ext/date/date_core.c (revision 35877) +++ ext/date/date_core.c (revision 35878) @@ -4696,6 +4696,9 @@ int df, of; double sg; + rb_check_frozen(self); + rb_check_trusted(self); + rb_scan_args(argc, argv, "05", &vjd, &vdf, &vsf, &vof, &vsg); jd = INT2FIX(0); @@ -4749,6 +4752,9 @@ static VALUE d_lite_initialize_copy(VALUE copy, VALUE date) { + rb_check_frozen(copy); + rb_check_trusted(copy); + if (copy == date) return copy; { @@ -7270,6 +7276,9 @@ { get_d1(self); + rb_check_frozen(self); + rb_check_trusted(self); + if (TYPE(a) != T_ARRAY) rb_raise(rb_eTypeError, "expected an array"); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/