1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

encoding.c: use rb_check_arity

* encoding.c (enc_dump): use rb_check_arity to just check number
  of arguments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-12-02 06:48:51 +00:00
parent bf0723644b
commit 4bef8cffa3

View file

@ -1268,7 +1268,7 @@ enc_compatible_p(VALUE klass, VALUE str1, VALUE str2)
static VALUE
enc_dump(int argc, VALUE *argv, VALUE self)
{
rb_scan_args(argc, argv, "01", 0);
rb_check_arity(argc, 0, 1);
return enc_name(self);
}