# File lib/mocha/class_method.rb, line 44 44: def hidden_method 45: if RUBY_VERSION < '1.9' 46: method_name = method.to_s.gsub(/\W/) { |s| "_substituted_character_#{s[0]}_" } 47: else 48: method_name = method.to_s.gsub(/\W/) { |s| "_substituted_character_#{s.ord}_" } 49: end 50: "__stubba__#{method_name}__stubba__" 51: end