summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-07-13 04:38:01 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-07-13 04:38:01 +0000
commit35c6e6af5ba2c405a91dc6b9e4af833d0979ed22 (patch)
tree7f54dda0bcda0a58eb5229def03ce3015c98a2b5 /eval.c
parent71d408a6c3298b229c0f1d2ff7159ca410a4c612 (diff)
str2cstr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index 2a174a1868..2ed291d0c6 100644
--- a/eval.c
+++ b/eval.c
@@ -3958,11 +3958,11 @@ f_eval(argc, argv, self)
int line = 0;
rb_scan_args(argc, argv, "13", &src, &scope, &vfile, &vline);
- if (!NIL_P(vfile)) {
+ if (argc >= 3) {
Check_Type(vfile, T_STRING);
file = RSTRING(vfile)->ptr;
}
- if (!NIL_P(vline)) {
+ if (argc >= 4) {
line = NUM2INT(vline);
}