[ruby-cvs:69754] mrkn:r62582 (trunk): Use RB_INTEGER_TYPE_P instead of rb_obj_is_kind_of

mrkn at ruby-lang.org mrkn at ruby-lang.org
Mon Feb 26 16:57:15 JST 2018


mrkn	2018-02-26 16:57:15 +0900 (Mon, 26 Feb 2018)

  New Revision: 62582

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62582

  Log:
    Use RB_INTEGER_TYPE_P instead of rb_obj_is_kind_of
    
    For checking whether an object is an Integer, because a subclass of
    Integer is meaningless in Ruby, RB_INTEGER_TYPE_P is better than
    rb_obj_is_kind_of for speed.
    
    * object.c (rb_to_integer): Use RB_INTEGER_TYPE_P instead of rb_obj_is_kind_of.
    
    * object.c (rb_check_to_integer): ditto.
    
    * range.c (range_max): ditto.

  Modified files:
    trunk/object.c
    trunk/range.c


More information about the ruby-cvs mailing list