Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 164 lines (135 sloc) 2.006 kb
908b2d6 @zenspider Pulled flat history from subversion.
zenspider authored
1 class Heckled
2 attr_accessor :names
7a3edda @zenspider Whitespace cleanup. Ugh.
zenspider authored
3
908b2d6 @zenspider Pulled flat history from subversion.
zenspider authored
4 def initialize
5 @names = []
6 end
7a3edda @zenspider Whitespace cleanup. Ugh.
zenspider authored
7
70089de @drbrain Heckle :call nodes.
drbrain authored
8 def uses_call
9 some_func + some_other_func
10 end
11
11acf4e @drbrain Fix heckling of call with block.
drbrain authored
12 def uses_callblock
13 x.y { 1 }
14 end
15
20425b1 @drbrain Heckle :cvasgn.
drbrain authored
16 def uses_cvasgn
17 @@cvar = 5
18 @@cvar = nil
19 end
20
4e182b2 @drbrain Heckle :dasgn.
drbrain authored
21 def uses_dasgn
22 loop do |dvar|
23 loop do
24 dvar = 5
25 dvar = nil
26 end
27 end
28 end
29
6840938 @drbrain Heckle dasgn_curr.
drbrain authored
30 def uses_dasgncurr
31 loop do |dvar|
32 dvar = 5
33 dvar = nil
34 end
35 end
36
c3ee53e @drbrain Heckle iasgn.
drbrain authored
37 def uses_iasgn
38 @ivar = 5
39 @ivar = nil
40 end
41
980b6d2 @drbrain Heckle gasgn.
drbrain authored
42 def uses_gasgn
43 $gvar = 5
44 $gvar = nil
45 end
46
4882680 @drbrain Heckle :lasgn.
drbrain authored
47 def uses_lasgn
48 lvar = 5
49 lvar = nil
50 end
51
7e53fd2 @drbrain Handle asgns in masgn.
drbrain authored
52 def uses_masgn
53 @a, $b, c = 5, 6, 7
54 end
55
908b2d6 @zenspider Pulled flat history from subversion.
zenspider authored
56 def uses_many_things
57 i = 1
58 while i < 10
59 i += 1
60 until some_func
61 some_other_func
62 end
63 return true if "hi there" == "changeling"
64 return false
7a3edda @zenspider Whitespace cleanup. Ugh.
zenspider authored
65 end
908b2d6 @zenspider Pulled flat history from subversion.
zenspider authored
66 i
67 end
7a3edda @zenspider Whitespace cleanup. Ugh.
zenspider authored
68
908b2d6 @zenspider Pulled flat history from subversion.
zenspider authored
69 def uses_while
70 while some_func
71 some_other_func
72 end
73 end
74
75 def uses_until
76 until some_func
77 some_other_func
78 end
79 end
7a3edda @zenspider Whitespace cleanup. Ugh.
zenspider authored
80
908b2d6 @zenspider Pulled flat history from subversion.
zenspider authored
81 def uses_numeric_literals
82 i = 1
83 i += 2147483648
84 i -= 3.5
85 end
7a3edda @zenspider Whitespace cleanup. Ugh.
zenspider authored
86
908b2d6 @zenspider Pulled flat history from subversion.
zenspider authored
87 def uses_strings
88 @names << "Hello, Robert"
89 @names << "Hello, Jeff"
90 @names << "Hi, Frank"
91 end
7a3edda @zenspider Whitespace cleanup. Ugh.
zenspider authored
92
908b2d6 @zenspider Pulled flat history from subversion.
zenspider authored
93 def uses_different_types
94 i = 1
95 b = "Hello, Joe"
96 c = 3.3
97 end
7a3edda @zenspider Whitespace cleanup. Ugh.
zenspider authored
98
449beb4 @zenspider - Fixed dependencies so heckle doesn't use ruby_parser 3 and friends
zenspider authored
99 def uses_literal
100 i = 1
101 end
102
7a3edda @zenspider Whitespace cleanup. Ugh.
zenspider authored
103 def uses_same_literal
908b2d6 @zenspider Pulled flat history from subversion.
zenspider authored
104 i = 1
105 i = 1
106 i = 1
107 end
7a3edda @zenspider Whitespace cleanup. Ugh.
zenspider authored
108
908b2d6 @zenspider Pulled flat history from subversion.
zenspider authored
109 def uses_if
110 if some_func
111 if some_other_func
112 return
113 end
114 end
115 end
7a3edda @zenspider Whitespace cleanup. Ugh.
zenspider authored
116
908b2d6 @zenspider Pulled flat history from subversion.
zenspider authored
117 def uses_boolean
ca2062c @zenspider Removed all extra warnings from the unit tests.
zenspider authored
118 a = true
119 b = false
908b2d6 @zenspider Pulled flat history from subversion.
zenspider authored
120 end
7a3edda @zenspider Whitespace cleanup. Ugh.
zenspider authored
121
908b2d6 @zenspider Pulled flat history from subversion.
zenspider authored
122 def uses_unless
123 unless true
124 if false
125 return
126 end
127 end
128 end
7a3edda @zenspider Whitespace cleanup. Ugh.
zenspider authored
129
908b2d6 @zenspider Pulled flat history from subversion.
zenspider authored
130 def uses_symbols
131 i = :blah
132 i = :blah
133 i = :and_blah
134 end
7a3edda @zenspider Whitespace cleanup. Ugh.
zenspider authored
135
908b2d6 @zenspider Pulled flat history from subversion.
zenspider authored
136 def uses_regexes
137 i = /a.*/
138 i = /c{2,4}+/
139 i = /123/
140 end
7a3edda @zenspider Whitespace cleanup. Ugh.
zenspider authored
141
908b2d6 @zenspider Pulled flat history from subversion.
zenspider authored
142 def uses_ranges
143 i = 6..100
144 i = -1..9
145 i = 1..4
146 end
7a3edda @zenspider Whitespace cleanup. Ugh.
zenspider authored
147
8fda096 @kevinclark Syncing to latest svn with facelift and all around better heckling.
kevinclark authored
148 def uses_nothing
149 end
d177d5f @zenspider Added .autotest to help with test mappings.
zenspider authored
150
151 def uses_iter
152 x = [ 1, 2, 3 ]
153 x.each { |y| y }
154 end
155
273e59b @kevinclark Class method support
kevinclark authored
156 def self.is_a_klass_method?
157 true
158 end
908b2d6 @zenspider Pulled flat history from subversion.
zenspider authored
159 private
7a3edda @zenspider Whitespace cleanup. Ugh.
zenspider authored
160
908b2d6 @zenspider Pulled flat history from subversion.
zenspider authored
161 def some_func; end
162 def some_other_func; end
163 end
Something went wrong with that request. Please try again.