зеркало из https://github.com/github/ruby.git
* ext/date/date_core.c: checks whether the object is frozen or not.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
bdc55aa0c6
Коммит
1ddb6f7059
|
@ -1,3 +1,7 @@
|
|||
Sun Jun 3 14:13:58 2012 Tadayoshi Funaba <tadf@dotrb.org>
|
||||
|
||||
* ext/date/date_core.c: checks whether the object is frozen or not.
|
||||
|
||||
Sun Jun 3 14:00:51 2012 Tadayoshi Funaba <tadf@dotrb.org>
|
||||
|
||||
* complex.c: wrote Complex#_dump and Complex::load. But now
|
||||
|
|
|
@ -4696,6 +4696,9 @@ d_lite_initialize(int argc, VALUE *argv, VALUE self)
|
|||
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 @@ d_lite_initialize(int argc, VALUE *argv, VALUE self)
|
|||
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 @@ d_lite_marshal_load(VALUE self, VALUE a)
|
|||
{
|
||||
get_d1(self);
|
||||
|
||||
rb_check_frozen(self);
|
||||
rb_check_trusted(self);
|
||||
|
||||
if (TYPE(a) != T_ARRAY)
|
||||
rb_raise(rb_eTypeError, "expected an array");
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче