summaryrefslogtreecommitdiffstats
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
commit3e2d55e441089f44ca2b97e174a0d15f0db5febe (patch)
tree0d3abef059492db16681931cd7d8530c7fdb7666 /marshal.c
parentc6df8c18efdf6e2ab9fba1e2eeeedf7cbbe3ae69 (diff)
downloadruby-3e2d55e441089f44ca2b97e174a0d15f0db5febe.tar.gz
ruby-3e2d55e441089f44ca2b97e174a0d15f0db5febe.tar.xz
ruby-3e2d55e441089f44ca2b97e174a0d15f0db5febe.zip
credit rb_name_error() fix to Nobuyoshi Nakada.
git-svn-id: http://svn.ruby-lang.org/repos/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 29620125d..d8f770309 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);
+}