diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-02-14 03:02:05 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-02-14 03:02:05 +0000 |
commit | 03af53f559078719e8a07380beaa8748853fce29 (patch) | |
tree | 1274295cdfa18ce006c62afbf93475ae9edee381 /random.c | |
parent | eeeb7ae8c06164dfe445db35f08eea0255c2617a (diff) | |
download | ruby-03af53f559078719e8a07380beaa8748853fce29.tar.gz |
random.c: use PRIsVALUE
* random.c (rand_random): use PRIsVALUE to format an error
message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'random.c')
-rw-r--r-- | random.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -1165,9 +1165,7 @@ rand_random(int argc, VALUE *argv, rb_random_t *rnd) (void)NUM2LONG(vmax); } if (NIL_P(v)) { - VALUE mesg = rb_str_new_cstr("invalid argument - "); - rb_str_append(mesg, rb_obj_as_string(argv[0])); - rb_exc_raise(rb_exc_new3(rb_eArgError, mesg)); + rb_raise(rb_eArgError, "invalid argument - %"PRIsVALUE, argv[0]); } return v; |