summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-07-03 07:29:00 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-07-03 07:29:00 +0000
commit08eef47e5b0ce77d457fca8a0f5e1fa257d984c6 (patch)
tree0d3abef059492db16681931cd7d8530c7fdb7666 /marshal.c
parent604a8f18836e7779b2859bab86e3eb0f77bdfb55 (diff)
credit rb_name_error() fix to Nobuyoshi Nakada.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/marshal.c b/marshal.c
index 2962012..d8f7703 100644
--- a/marshal.c
+++ b/marshal.c
@@ -1097,3 +1097,23 @@ Init_marshal()
rb_define_module_function(rb_mMarshal, "load", marshal_load, -1);
rb_define_module_function(rb_mMarshal, "restore", marshal_load, -1);
}
+
+VALUE
+rb_marshal_dump(obj, port)
+ VALUE obj, port;
+{
+ int argc = 1;
+ VALUE argv[2];
+
+ argv[0] = obj;
+ argv[1] = port;
+ if (!NIL_P(port)) argc = 2;
+ return marshal_dump(argc, argv);
+}
+
+VALUE
+rb_marshal_load(port)
+ VALUE port;
+{
+ return marshal_load(1, &port);
+}