Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Re: Power Assert in Ruby

k_tsj
November 08, 2015

Re: Power Assert in Ruby

k_tsj

November 08, 2015
Tweet

More Decks by k_tsj

Other Decks in Programming

Transcript

  1. ݪҼ • Fixnum#==ͳͲͷجຊతͳϝιου͸ಛघ έʔεѻ͍Ͱ؆ུԽͨ͠ॲཧΛ͍ͯ͠ΔͨΊ if (FIXNUM_2_P(recv, obj) && BASIC_OP_UNREDEFINED_P(BOP_EQ, FIXNUM_REDEFINED_OP_FLAG))

    { return (recv == obj) ? Qtrue : Qfalse; } else if(...) { ... } ... CALL_SIMPLE_METHOD(recv); ಛघέʔε(1) ಛघέʔε(..N) Ұൠέʔεɹ
  2. ଓɾݪҼ • ϝιουͷ࣮ମ͕ಛఆͷCؔ਺(rb_obj_equal) ͩͬͨͱ͖͸ಛघέʔεѻ͍Ͱ؆ུԽͨ͠ॲ ཧΛ͍ͯ͠ΔͨΊ ... vm_search_method(ci, cc, recv); if

    (check_cfunc(cc->me, rb_obj_equal)) { return recv == obj ? Qtrue : Qfalse; } ... CALL_SIMPLE_METHOD(recv);