File: inline_mapping_instead_of_zentest_mapping

package info (click to toggle)
ruby-inline 3.11.2-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 328 kB
  • sloc: ruby: 1,482; makefile: 2
file content (40 lines) | stat: -rw-r--r-- 1,255 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
34
35
36
37
38
39
40
Author: Gunnar Wolf <gwolf@debian.org>
Forwarded: Not-needed
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=658889
Last-Update: 2012-02-06
Applied-upstream: no
Description: Replaced ZenTestMapping usage with custom implementation
 This avoids pulling in a series of build-dependencies while allowing
 us to run the test suite

Index: ruby-inline/lib/inline.rb
===================================================================
--- ruby-inline.orig/lib/inline.rb	2012-02-06 13:10:32.000000000 -0600
+++ ruby-inline/lib/inline.rb	2012-02-06 13:10:33.000000000 -0600
@@ -52,7 +52,7 @@
 require 'fileutils'
 #require 'rubygems'
 
-require 'zentest_mapping'
+require 'inline_method_name_mapping'
 
 $TESTING = false unless defined? $TESTING
 
@@ -156,7 +156,7 @@
 
   class C
 
-    include ZenTestMapping
+    include MethodNameMapping
 
     MAGIC_ARITY_THRESHOLD = 15
     MAGIC_ARITY = -1
@@ -250,7 +250,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 = options[:arity] || signature['arity']