aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/date/date_core.c20
2 files changed, 15 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 37f2d530c9..8a36ca4f26 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jun 6 19:31:33 2013 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * ext/date/date_core.c: fixed coding error [ruby-core:55337].
+ reported by Riley Lynch.
+
Thu Jun 6 14:16:37 2013 Narihiro Nakamura <authornari@gmail.com>
* ext/objspace/object_tracing.c: rename allocation_info to
diff --git a/ext/date/date_core.c b/ext/date/date_core.c
index e539402a2c..54556303b9 100644
--- a/ext/date/date_core.c
+++ b/ext/date/date_core.c
@@ -2015,7 +2015,7 @@ civil_to_jd(VALUE y, int m, int d, double sg,
*ry = FIX2INT(y);
else {
VALUE nth2;
- decode_year(y, ns ? -1 : +1, &nth2, ry);
+ decode_year(y, *ns ? -1 : +1, &nth2, ry);
}
}
else {
@@ -2050,7 +2050,7 @@ ordinal_to_jd(VALUE y, int d, double sg,
*ry = FIX2INT(y);
else {
VALUE nth2;
- decode_year(y, ns ? -1 : +1, &nth2, ry);
+ decode_year(y, *ns ? -1 : +1, &nth2, ry);
}
}
else {
@@ -2085,7 +2085,7 @@ commercial_to_jd(VALUE y, int w, int d, double sg,
*ry = FIX2INT(y);
else {
VALUE nth2;
- decode_year(y, ns ? -1 : +1, &nth2, ry);
+ decode_year(y, *ns ? -1 : +1, &nth2, ry);
}
}
else {
@@ -2120,7 +2120,7 @@ weeknum_to_jd(VALUE y, int w, int d, int f, double sg,
*ry = FIX2INT(y);
else {
VALUE nth2;
- decode_year(y, ns ? -1 : +1, &nth2, ry);
+ decode_year(y, *ns ? -1 : +1, &nth2, ry);
}
}
else {
@@ -2155,7 +2155,7 @@ nth_kday_to_jd(VALUE y, int m, int n, int k, double sg,
*ry = FIX2INT(y);
else {
VALUE nth2;
- decode_year(y, ns ? -1 : +1, &nth2, ry);
+ decode_year(y, *ns ? -1 : +1, &nth2, ry);
}
}
else {
@@ -2194,7 +2194,7 @@ valid_ordinal_p(VALUE y, int d, double sg,
*ry = FIX2INT(y);
else {
VALUE nth2;
- decode_year(y, ns ? -1 : +1, &nth2, ry);
+ decode_year(y, *ns ? -1 : +1, &nth2, ry);
}
}
else {
@@ -2233,7 +2233,7 @@ valid_civil_p(VALUE y, int m, int d, double sg,
*ry = FIX2INT(y);
else {
VALUE nth2;
- decode_year(y, ns ? -1 : +1, &nth2, ry);
+ decode_year(y, *ns ? -1 : +1, &nth2, ry);
}
}
else {
@@ -2269,7 +2269,7 @@ valid_commercial_p(VALUE y, int w, int d, double sg,
*ry = FIX2INT(y);
else {
VALUE nth2;
- decode_year(y, ns ? -1 : +1, &nth2, ry);
+ decode_year(y, *ns ? -1 : +1, &nth2, ry);
}
}
else {
@@ -2299,7 +2299,7 @@ valid_weeknum_p(VALUE y, int w, int d, int f, double sg,
*ry = FIX2INT(y);
else {
VALUE nth2;
- decode_year(y, ns ? -1 : +1, &nth2, ry);
+ decode_year(y, *ns ? -1 : +1, &nth2, ry);
}
}
else {
@@ -2330,7 +2330,7 @@ valid_nth_kday_p(VALUE y, int m, int n, int k, double sg,
*ry = FIX2INT(y);
else {
VALUE nth2;
- decode_year(y, ns ? -1 : +1, &nth2, ry);
+ decode_year(y, *ns ? -1 : +1, &nth2, ry);
}
}
else {