# File lib/mocha/class_method.rb, line 58 58: def hidden_method 59: if RUBY_VERSION < '1.9' 60: method_name = method.to_s.gsub(/\W/) { |s| "_substituted_character_#{s[0]}_" } 61: else 62: method_name = method.to_s.gsub(/\W/) { |s| "_substituted_character_#{s.ord}_" } 63: end 64: hidden_method = "__stubba__#{method_name}__stubba__" 65: RUBY_VERSION < '1.9' ? hidden_method.to_s : hidden_method.to_sym 66: end