sample.rb ���� V �: � V #-*- coding:utf-8 -*- # # Ruby skeleton file # require 'benchmark' require 'ruby-prof' itrs = 500 price = 101 # list = [1000, 2000, 696, 389, 392] list = [] itrs.times do list << rand(100) end # 単純に税込みにするための関数を追加 class Numeric def tax (self * Base::TAX_RATE).floor end def tax_lambda -> i{(self * Base::TAX_RATE).floor} end end class Base TAX_RATE = 1.05 def self.tax(price) (