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

proc.c, vm.c: fix implicit conversions

* proc.c (rb_mod_define_method): fix implicit conversion of
  visibility type. erred by -Werror=shorten-64-to-32.

* vm.c (vm_define_method): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-03-08 23:20:13 +00:00
parent 5856347f16
commit 140d7fd95d
2 changed files with 3 additions and 3 deletions

4
proc.c
View file

@ -1638,11 +1638,11 @@ rb_mod_define_method(int argc, VALUE *argv, VALUE mod)
{
ID id;
VALUE body;
int noex = NOEX_PUBLIC;
rb_method_flag_t noex = NOEX_PUBLIC;
const rb_cref_t *cref = rb_vm_cref_in_context(mod, mod);
if (cref) {
noex = CREF_VISI(cref);
noex = (rb_method_flag_t)CREF_VISI(cref);
}
if (argc == 1) {

2
vm.c
View file

@ -2267,7 +2267,7 @@ vm_define_method(rb_thread_t *th, VALUE obj, ID id, VALUE iseqval,
rb_num_t is_singleton, rb_cref_t *cref)
{
VALUE klass = CREF_CLASS(cref);
int noex = CREF_VISI(cref);
rb_method_flag_t noex = (rb_method_flag_t)CREF_VISI(cref);
rb_iseq_t *miseq;
GetISeqPtr(iseqval, miseq);