summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--ext/iconv/iconv.c2
-rw-r--r--ext/openssl/ossl_asn1.c3
-rw-r--r--struct.c2
4 files changed, 17 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0b3446b8c83..ed8b616d750 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Tue Dec 21 00:53:01 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * ext/openssl/ossl_asn1.c (ossl_asn1_traverse): [ruby-dev:25261]
+
+ * ext/openssl/ossl_asn1.c (ossl_asn1_decode): ditto.
+
+ * ext/openssl/ossl_asn1.c (ossl_asn1_decode_all): ditto.
+
Mon Dec 20 23:22:26 2004 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
* added files:
@@ -65,6 +73,10 @@ Mon Dec 20 03:30:40 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/cgi/session.rb (CGI::Session#initialize): empty session id was
used if request had no session key. fixed: [ruby-core:03981]
+Mon Dec 20 01:51:01 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * struct.c (make_struct): [ruby-dev:25249]
+
Mon Dec 20 00:28:20 2004 Kouhei Sutou <kou@cozmixng.org>
* lib/rexml/encodings/SHIFT-JIS.rb: backported from CVS HEAD.
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index 29ab2c7d7b6..c395373ff27 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -732,7 +732,7 @@ iconv_iconv
return iconv_convert(VALUE2ICONV(cd), str,
NIL_P(n1) ? 0 : NUM2INT(n1),
- NIL_P(n2) ? -1 : NUM2INT(n1),
+ NIL_P(n2) ? -1 : NUM2INT(n2),
NULL);
}
diff --git a/ext/openssl/ossl_asn1.c b/ext/openssl/ossl_asn1.c
index a961c16bc0f..abea6f5f0c7 100644
--- a/ext/openssl/ossl_asn1.c
+++ b/ext/openssl/ossl_asn1.c
@@ -816,6 +816,7 @@ ossl_asn1_traverse(VALUE self, VALUE obj)
obj = ossl_to_der_if_possible(obj);
StringValue(obj);
+ obj = rb_str_new4(obj);
p = RSTRING(obj)->ptr;
ossl_asn1_decode0(&p, RSTRING(obj)->len, &offset, 0, 0, 1);
@@ -831,6 +832,7 @@ ossl_asn1_decode(VALUE self, VALUE obj)
obj = ossl_to_der_if_possible(obj);
StringValue(obj);
+ obj = rb_str_new4(obj);
p = RSTRING(obj)->ptr;
ary = ossl_asn1_decode0(&p, RSTRING(obj)->len, &offset, 0, 1, 0);
ret = rb_ary_entry(ary, 0);
@@ -847,6 +849,7 @@ ossl_asn1_decode_all(VALUE self, VALUE obj)
obj = ossl_to_der_if_possible(obj);
StringValue(obj);
+ obj = rb_str_new4(obj);
p = RSTRING(obj)->ptr;
ret = ossl_asn1_decode0(&p, RSTRING(obj)->len, &offset, 0, 0, 0);
diff --git a/struct.c b/struct.c
index a82799de4df..b1961233c0a 100644
--- a/struct.c
+++ b/struct.c
@@ -198,7 +198,7 @@ make_struct(name, members, klass)
rb_warn("redefining constant Struct::%s", cname);
rb_mod_remove_const(klass, ID2SYM(id));
}
- nstr = rb_define_class_under(klass, cname, klass);
+ nstr = rb_define_class_under(klass, rb_id2name(id), klass);
}
rb_iv_set(nstr, "__size__", LONG2NUM(RARRAY(members)->len));
rb_iv_set(nstr, "__members__", members);