# File lib/mocha/class_method.rb, line 69 69: def hidden_method 70: if RUBY_VERSION < '1.9' 71: method_name = method.to_s.gsub(/\W/) { |s| "_substituted_character_#{s[0]}_" } 72: else 73: method_name = method.to_s.gsub(/\W/) { |s| "_substituted_character_#{s.ord}_" } 74: end 75: hidden_method = "__stubba__#{method_name}__stubba__" 76: RUBY_VERSION < '1.9' ? hidden_method.to_s : hidden_method.to_sym 77: end