File: 02-replace-ZenTestMapping.patch

package info (click to toggle)
libinline-ruby 3.8.4-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 180 kB
  • ctags: 147
  • sloc: ruby: 1,467; makefile: 8
file content (33 lines) | stat: -rw-r--r-- 1,001 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Replace ZenTestMapping with a custom implementation of the method name mapping

Index: libinline-ruby-3.8.3/lib/inline.rb
===================================================================
--- libinline-ruby-3.8.3.orig/lib/inline.rb	2009-12-06 00:59:10.000000000 +0100
+++ libinline-ruby-3.8.3/lib/inline.rb	2009-12-06 01:00:06.000000000 +0100
@@ -52,7 +52,7 @@
 require 'fileutils'
 require 'rubygems'
 
-require 'zentest_mapping'
+require 'inline_method_name_mapping'
 
 $TESTING = false unless defined? $TESTING
 
@@ -151,7 +151,7 @@
 
   class C
 
-    include ZenTestMapping
+    include MethodNameMapping
 
     MAGIC_ARITY_THRESHOLD = 15
     MAGIC_ARITY = -1
@@ -245,7 +245,7 @@
       signature = parse_signature(src, !expand_types)
       function_name = signature['name']
       method_name = options[:method_name]
-      method_name ||= test_to_normal function_name
+      method_name ||= to_ruby function_name
       return_type = signature['return']
       arity = signature['arity']