rubybreaker 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/NEWS +5 -0
- data/NOTES +9 -0
- data/README.md +100 -183
- data/Rakefile +21 -6
- data/VERSION +1 -1
- data/bin/rubybreaker +34 -50
- data/lib/rubybreaker/debug/debug.rb +6 -0
- data/lib/rubybreaker/doc/rdoc.rb +37 -0
- data/lib/rubybreaker/doc.rb +3 -0
- data/lib/rubybreaker/runtime/inspector.rb +6 -28
- data/lib/rubybreaker/runtime/monitor.rb +21 -17
- data/lib/rubybreaker/runtime/object_wrapper.rb +7 -2
- data/lib/rubybreaker/runtime/type_system.rb +3 -5
- data/lib/rubybreaker/runtime/typesig_unparser.rb +1 -4
- data/lib/rubybreaker/runtime.rb +64 -105
- data/lib/rubybreaker/task.rb +97 -0
- data/lib/rubybreaker/test/rspec.rb +1 -1
- data/lib/rubybreaker/test/testcase.rb +13 -28
- data/lib/rubybreaker/type/type.rb +1 -1
- data/lib/rubybreaker/typing/subtyping.rb +10 -5
- data/lib/rubybreaker/util.rb +0 -1
- data/lib/rubybreaker.rb +163 -115
- data/test/integrated/tc_both_broken_breakable.rb +5 -4
- data/test/integrated/tc_class_methods.rb +4 -3
- data/test/integrated/tc_inherit_broken.rb +4 -3
- data/test/integrated/tc_method_missing.rb +4 -4
- data/test/integrated/tc_namespace.rb +4 -2
- data/test/integrated/tc_simple1.rb +4 -3
- data/test/runtime/tc_obj_wrapper.rb +25 -6
- data/test/runtime/tc_typesig_parser.rb +0 -1
- data/test/testtask/sample.rb +10 -0
- data/test/testtask/tc_testtask.rb +25 -0
- data/test/ts_rspec.rb +21 -15
- data/test/typing/tc_typing.rb +2 -3
- data/webpage/index.html +105 -193
- data/webpage/rdoc/Kernel.html +286 -0
- data/webpage/rdoc/Object.html +17 -11
- data/webpage/rdoc/Rake/RubyBreakerTestTask.html +374 -0
- data/webpage/rdoc/Rake.html +212 -0
- data/webpage/rdoc/RubyBreaker/Breakable.html +24 -40
- data/webpage/rdoc/RubyBreaker/Broken.html +21 -69
- data/webpage/rdoc/RubyBreaker/Context.html +16 -10
- data/webpage/rdoc/RubyBreaker/Errors/InternalError.html +16 -10
- data/webpage/rdoc/RubyBreaker/Errors/InvalidSubtypeCheck.html +16 -10
- data/webpage/rdoc/RubyBreaker/Errors/InvalidTypeConstruction.html +16 -10
- data/webpage/rdoc/RubyBreaker/Errors/SubtypeFailure.html +16 -10
- data/webpage/rdoc/RubyBreaker/Errors/TypeError.html +16 -10
- data/webpage/rdoc/RubyBreaker/Errors/UserError.html +16 -10
- data/webpage/rdoc/RubyBreaker/Errors.html +16 -10
- data/webpage/rdoc/RubyBreaker/ObjectPosition.html +16 -10
- data/webpage/rdoc/RubyBreaker/Position.html +16 -10
- data/webpage/rdoc/RubyBreaker/{TestCase.html → RDocSupport.html} +81 -82
- data/webpage/rdoc/RubyBreaker/RubyTypeUtils.html +16 -10
- data/webpage/rdoc/RubyBreaker/Runtime/Inspector.html +25 -44
- data/webpage/rdoc/RubyBreaker/Runtime/MethodInfo.html +16 -10
- data/webpage/rdoc/RubyBreaker/Runtime/Monitor.html +19 -13
- data/webpage/rdoc/RubyBreaker/Runtime/MonitorInstaller.html +37 -25
- data/webpage/rdoc/RubyBreaker/Runtime/MonitorSwitch.html +20 -14
- data/webpage/rdoc/RubyBreaker/Runtime/MonitorUtils.html +21 -15
- data/webpage/rdoc/RubyBreaker/Runtime/ObjectWrapper.html +23 -12
- data/webpage/rdoc/RubyBreaker/Runtime/Pluggable.html +16 -10
- data/webpage/rdoc/RubyBreaker/Runtime/TypeSigParser.html +16 -10
- data/webpage/rdoc/RubyBreaker/Runtime/{TypesigUnparser.html → TypeSigUnparser.html} +19 -16
- data/webpage/rdoc/RubyBreaker/Runtime/TypeSystem.html +18 -14
- data/webpage/rdoc/RubyBreaker/Runtime.html +145 -11
- data/webpage/rdoc/RubyBreaker/TypeComparer.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs/AnyType.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs/BlockType.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs/DuckType.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs/FusionType.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs/MethodListType.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs/MethodType.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs/NilType.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs/NominalType.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs/OptionalType.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs/OrType.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs/SelfType.html +17 -11
- data/webpage/rdoc/RubyBreaker/TypeDefs/Type.html +17 -11
- data/webpage/rdoc/RubyBreaker/TypeDefs/VarLengthType.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeDefs.html +16 -10
- data/webpage/rdoc/RubyBreaker/TypeUnparser.html +16 -10
- data/webpage/rdoc/RubyBreaker/Typing.html +17 -11
- data/webpage/rdoc/RubyBreaker/Util.html +16 -10
- data/webpage/rdoc/RubyBreaker.html +167 -34
- data/webpage/rdoc/{RubyBreaker/Runtime/TypePlaceholder.html → Test/Unit/TestCase.html} +68 -39
- data/webpage/rdoc/Test/Unit.html +211 -0
- data/webpage/rdoc/Test.html +211 -0
- data/webpage/rdoc/created.rid +18 -17
- data/webpage/rdoc/index.html +16 -10
- data/webpage/rdoc/js/search_index.js +1 -1
- data/webpage/rdoc/table_of_contents.html +61 -48
- metadata +21 -12
- data/lib/rubybreaker/rubylib/core.rb +0 -2483
- data/lib/rubybreaker/rubylib.rb +0 -3
- data/lib/rubybreaker/runtime/type_placeholder.rb +0 -23
- data/webpage/rdoc/RubyBreaker/Broken/BrokenEigen.html +0 -305
- data/webpage/rdoc/RubyBreaker/Main.html +0 -458
|
@@ -90,8 +90,6 @@
|
|
|
90
90
|
|
|
91
91
|
<li><a href="../../RubyBreaker/Broken.html">RubyBreaker::Broken</a>
|
|
92
92
|
|
|
93
|
-
<li><a href="../../RubyBreaker/Broken/BrokenEigen.html">RubyBreaker::Broken::BrokenEigen</a>
|
|
94
|
-
|
|
95
93
|
<li><a href="../../RubyBreaker/Context.html">RubyBreaker::Context</a>
|
|
96
94
|
|
|
97
95
|
<li><a href="../../RubyBreaker/Errors.html">RubyBreaker::Errors</a>
|
|
@@ -108,12 +106,12 @@
|
|
|
108
106
|
|
|
109
107
|
<li><a href="../../RubyBreaker/Errors/UserError.html">RubyBreaker::Errors::UserError</a>
|
|
110
108
|
|
|
111
|
-
<li><a href="../../RubyBreaker/Main.html">RubyBreaker::Main</a>
|
|
112
|
-
|
|
113
109
|
<li><a href="../../RubyBreaker/ObjectPosition.html">RubyBreaker::ObjectPosition</a>
|
|
114
110
|
|
|
115
111
|
<li><a href="../../RubyBreaker/Position.html">RubyBreaker::Position</a>
|
|
116
112
|
|
|
113
|
+
<li><a href="../../RubyBreaker/RDocSupport.html">RubyBreaker::RDocSupport</a>
|
|
114
|
+
|
|
117
115
|
<li><a href="../../RubyBreaker/RubyTypeUtils.html">RubyBreaker::RubyTypeUtils</a>
|
|
118
116
|
|
|
119
117
|
<li><a href="../../RubyBreaker/Runtime.html">RubyBreaker::Runtime</a>
|
|
@@ -134,15 +132,11 @@
|
|
|
134
132
|
|
|
135
133
|
<li><a href="../../RubyBreaker/Runtime/Pluggable.html">RubyBreaker::Runtime::Pluggable</a>
|
|
136
134
|
|
|
137
|
-
<li><a href="../../RubyBreaker/Runtime/TypePlaceholder.html">RubyBreaker::Runtime::TypePlaceholder</a>
|
|
138
|
-
|
|
139
135
|
<li><a href="../../RubyBreaker/Runtime/TypeSigParser.html">RubyBreaker::Runtime::TypeSigParser</a>
|
|
140
136
|
|
|
141
|
-
<li><a href="../../RubyBreaker/Runtime/
|
|
142
|
-
|
|
143
|
-
<li><a href="../../RubyBreaker/Runtime/TypesigUnparser.html">RubyBreaker::Runtime::TypesigUnparser</a>
|
|
137
|
+
<li><a href="../../RubyBreaker/Runtime/TypeSigUnparser.html">RubyBreaker::Runtime::TypeSigUnparser</a>
|
|
144
138
|
|
|
145
|
-
<li><a href="../../RubyBreaker/
|
|
139
|
+
<li><a href="../../RubyBreaker/Runtime/TypeSystem.html">RubyBreaker::Runtime::TypeSystem</a>
|
|
146
140
|
|
|
147
141
|
<li><a href="../../RubyBreaker/TypeComparer.html">RubyBreaker::TypeComparer</a>
|
|
148
142
|
|
|
@@ -180,6 +174,18 @@
|
|
|
180
174
|
|
|
181
175
|
<li><a href="../../RubyBreaker/Util.html">RubyBreaker::Util</a>
|
|
182
176
|
|
|
177
|
+
<li><a href="../../Test.html">Test</a>
|
|
178
|
+
|
|
179
|
+
<li><a href="../../Test/Unit.html">Test::Unit</a>
|
|
180
|
+
|
|
181
|
+
<li><a href="../../Test/Unit/TestCase.html">Test::Unit::TestCase</a>
|
|
182
|
+
|
|
183
|
+
<li><a href="../../Rake.html">Rake</a>
|
|
184
|
+
|
|
185
|
+
<li><a href="../../Rake/RubyBreakerTestTask.html">Rake::RubyBreakerTestTask</a>
|
|
186
|
+
|
|
187
|
+
<li><a href="../../Kernel.html">Kernel</a>
|
|
188
|
+
|
|
183
189
|
<li><a href="../../Object.html">Object</a>
|
|
184
190
|
|
|
185
191
|
</ul>
|
|
@@ -193,9 +199,7 @@
|
|
|
193
199
|
|
|
194
200
|
<div id="description" class="description">
|
|
195
201
|
|
|
196
|
-
<p>This module inspects
|
|
197
|
-
<a href="../Broken.html">Broken</a> module, or a hybrid module to fetch the
|
|
198
|
-
type information for each method.</p>
|
|
202
|
+
<p>This module inspects type information gathered so far.</p>
|
|
199
203
|
|
|
200
204
|
</div><!-- description -->
|
|
201
205
|
|
|
@@ -234,21 +238,11 @@ containing (method name, method type) pairs.</p>
|
|
|
234
238
|
|
|
235
239
|
|
|
236
240
|
<div class="method-source-code" id="inspect_all-source">
|
|
237
|
-
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/inspector.rb, line
|
|
241
|
+
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/inspector.rb, line 41</span>
|
|
238
242
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">inspect_all</span>(<span class="ruby-identifier">mod</span>)
|
|
239
243
|
<span class="ruby-identifier">mtypes</span> = {}
|
|
240
|
-
<span class="ruby-identifier">mm</span> = <span class="ruby-constant">
|
|
241
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">mm</span>
|
|
242
|
-
<span class="ruby-identifier">mm</span>.<span class="ruby-identifier">meth_type_map</span>.<span class="ruby-identifier">each_pair</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">im</span>,<span class="ruby-identifier">mtype</span><span class="ruby-operator">|</span>
|
|
243
|
-
<span class="ruby-identifier">mtypes</span>[<span class="ruby-identifier">im</span>] = <span class="ruby-identifier">mtype</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">mtype</span>
|
|
244
|
-
}
|
|
245
|
-
<span class="ruby-keyword">end</span>
|
|
246
|
-
<span class="ruby-identifier">mm</span> = <span class="ruby-constant">Broken</span><span class="ruby-operator">::</span><span class="ruby-constant">TYPE_PLACEHOLDER_MAP</span>[<span class="ruby-identifier">mod</span>]
|
|
247
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">mm</span>
|
|
248
|
-
<span class="ruby-identifier">mm</span>.<span class="ruby-identifier">meth_type_map</span>.<span class="ruby-identifier">each_pair</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">im</span>,<span class="ruby-identifier">mtype</span><span class="ruby-operator">|</span>
|
|
249
|
-
<span class="ruby-identifier">mtypes</span>[<span class="ruby-identifier">im</span>] = <span class="ruby-identifier">mtype</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">mtype</span>
|
|
250
|
-
}
|
|
251
|
-
<span class="ruby-keyword">end</span>
|
|
244
|
+
<span class="ruby-identifier">mm</span> = <span class="ruby-constant">TYPE_MAP</span>[<span class="ruby-identifier">mod</span>]
|
|
245
|
+
<span class="ruby-identifier">mm</span>.<span class="ruby-identifier">each_pair</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">im</span>,<span class="ruby-identifier">mtype</span><span class="ruby-operator">|</span> <span class="ruby-identifier">mtypes</span>[<span class="ruby-identifier">im</span>] = <span class="ruby-identifier">mtype</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">mtype</span> } <span class="ruby-keyword">if</span> <span class="ruby-identifier">mm</span>
|
|
252
246
|
<span class="ruby-keyword">return</span> <span class="ruby-identifier">mtypes</span>
|
|
253
247
|
<span class="ruby-keyword">end</span></pre>
|
|
254
248
|
</div><!-- inspect_all-source -->
|
|
@@ -280,7 +274,7 @@ eigen class.</p>
|
|
|
280
274
|
|
|
281
275
|
|
|
282
276
|
<div class="method-source-code" id="inspect_class_meth-source">
|
|
283
|
-
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/inspector.rb, line
|
|
277
|
+
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/inspector.rb, line 25</span>
|
|
284
278
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">inspect_class_meth</span>(<span class="ruby-identifier">mod</span>, <span class="ruby-identifier">mname</span>)
|
|
285
279
|
<span class="ruby-identifier">eigen_class</span> = <span class="ruby-constant">Runtime</span>.<span class="ruby-identifier">eigen_class</span>(<span class="ruby-identifier">mod</span>)
|
|
286
280
|
<span class="ruby-keyword">return</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">inspect_meth</span>(<span class="ruby-identifier">eigen_class</span>, <span class="ruby-identifier">mname</span>)
|
|
@@ -306,28 +300,15 @@ eigen class.</p>
|
|
|
306
300
|
|
|
307
301
|
<div class="method-description">
|
|
308
302
|
|
|
309
|
-
<p>This method inspects the module for the type of the specified method
|
|
310
|
-
returns the method type or method list type for the given method, by
|
|
311
|
-
looking at, first, the placeholder for the <a
|
|
312
|
-
href="../Breakable.html">Breakable</a> side of the module, and then, the
|
|
313
|
-
placeholder for the <a href="../Broken.html">Broken</a> side of the module.
|
|
314
|
-
If no method exists or if there is no type information for the method, it
|
|
315
|
-
returns nil.</p>
|
|
303
|
+
<p>This method inspects the module for the type of the specified method.</p>
|
|
316
304
|
|
|
317
305
|
|
|
318
306
|
|
|
319
307
|
<div class="method-source-code" id="inspect_meth-source">
|
|
320
|
-
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/inspector.rb, line
|
|
308
|
+
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/inspector.rb, line 17</span>
|
|
321
309
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">inspect_meth</span>(<span class="ruby-identifier">mod</span>, <span class="ruby-identifier">mname</span>)
|
|
322
310
|
<span class="ruby-identifier">mname</span> = <span class="ruby-identifier">mname</span>.<span class="ruby-identifier">to_sym</span>
|
|
323
|
-
<span class="ruby-
|
|
324
|
-
<span class="ruby-identifier">placeholder</span> = <span class="ruby-constant">Breakable</span><span class="ruby-operator">::</span><span class="ruby-constant">TYPE_PLACEHOLDER_MAP</span>[<span class="ruby-identifier">mod</span>]
|
|
325
|
-
<span class="ruby-keyword">end</span>
|
|
326
|
-
<span class="ruby-identifier">t</span> = <span class="ruby-identifier">placeholder</span>.<span class="ruby-identifier">meth_type_map</span>[<span class="ruby-identifier">mname</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">placeholder</span>
|
|
327
|
-
<span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">t</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">Broken</span><span class="ruby-operator">::</span><span class="ruby-constant">TYPE_PLACEHOLDER_MAP</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">mod</span>)
|
|
328
|
-
<span class="ruby-identifier">placeholder</span> = <span class="ruby-constant">Broken</span><span class="ruby-operator">::</span><span class="ruby-constant">TYPE_PLACEHOLDER_MAP</span>[<span class="ruby-identifier">mod</span>]
|
|
329
|
-
<span class="ruby-identifier">t</span> = <span class="ruby-identifier">placeholder</span>.<span class="ruby-identifier">meth_type_map</span>[<span class="ruby-identifier">mname</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">placeholder</span>
|
|
330
|
-
<span class="ruby-keyword">end</span>
|
|
311
|
+
<span class="ruby-identifier">t</span> = <span class="ruby-constant">TYPE_MAP</span>[<span class="ruby-identifier">mod</span>][<span class="ruby-identifier">mname</span>] <span class="ruby-keyword">if</span> <span class="ruby-constant">TYPE_MAP</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">mod</span>)
|
|
331
312
|
<span class="ruby-keyword">return</span> <span class="ruby-identifier">t</span>
|
|
332
313
|
<span class="ruby-keyword">end</span></pre>
|
|
333
314
|
</div><!-- inspect_meth-source -->
|
|
@@ -358,7 +339,7 @@ a hash of (mname, mtype) pairs.</p>
|
|
|
358
339
|
|
|
359
340
|
|
|
360
341
|
<div class="method-source-code" id="inspect_meths-source">
|
|
361
|
-
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/inspector.rb, line
|
|
342
|
+
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/inspector.rb, line 31</span>
|
|
362
343
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">inspect_meths</span>(<span class="ruby-identifier">mod</span>, <span class="ruby-identifier">mnames</span>)
|
|
363
344
|
<span class="ruby-identifier">mtype_hash</span> = {}
|
|
364
345
|
<span class="ruby-identifier">mnames</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">mname</span><span class="ruby-operator">|</span>
|
|
@@ -90,8 +90,6 @@
|
|
|
90
90
|
|
|
91
91
|
<li><a href="../../RubyBreaker/Broken.html">RubyBreaker::Broken</a>
|
|
92
92
|
|
|
93
|
-
<li><a href="../../RubyBreaker/Broken/BrokenEigen.html">RubyBreaker::Broken::BrokenEigen</a>
|
|
94
|
-
|
|
95
93
|
<li><a href="../../RubyBreaker/Context.html">RubyBreaker::Context</a>
|
|
96
94
|
|
|
97
95
|
<li><a href="../../RubyBreaker/Errors.html">RubyBreaker::Errors</a>
|
|
@@ -108,12 +106,12 @@
|
|
|
108
106
|
|
|
109
107
|
<li><a href="../../RubyBreaker/Errors/UserError.html">RubyBreaker::Errors::UserError</a>
|
|
110
108
|
|
|
111
|
-
<li><a href="../../RubyBreaker/Main.html">RubyBreaker::Main</a>
|
|
112
|
-
|
|
113
109
|
<li><a href="../../RubyBreaker/ObjectPosition.html">RubyBreaker::ObjectPosition</a>
|
|
114
110
|
|
|
115
111
|
<li><a href="../../RubyBreaker/Position.html">RubyBreaker::Position</a>
|
|
116
112
|
|
|
113
|
+
<li><a href="../../RubyBreaker/RDocSupport.html">RubyBreaker::RDocSupport</a>
|
|
114
|
+
|
|
117
115
|
<li><a href="../../RubyBreaker/RubyTypeUtils.html">RubyBreaker::RubyTypeUtils</a>
|
|
118
116
|
|
|
119
117
|
<li><a href="../../RubyBreaker/Runtime.html">RubyBreaker::Runtime</a>
|
|
@@ -134,15 +132,11 @@
|
|
|
134
132
|
|
|
135
133
|
<li><a href="../../RubyBreaker/Runtime/Pluggable.html">RubyBreaker::Runtime::Pluggable</a>
|
|
136
134
|
|
|
137
|
-
<li><a href="../../RubyBreaker/Runtime/TypePlaceholder.html">RubyBreaker::Runtime::TypePlaceholder</a>
|
|
138
|
-
|
|
139
135
|
<li><a href="../../RubyBreaker/Runtime/TypeSigParser.html">RubyBreaker::Runtime::TypeSigParser</a>
|
|
140
136
|
|
|
141
|
-
<li><a href="../../RubyBreaker/Runtime/
|
|
142
|
-
|
|
143
|
-
<li><a href="../../RubyBreaker/Runtime/TypesigUnparser.html">RubyBreaker::Runtime::TypesigUnparser</a>
|
|
137
|
+
<li><a href="../../RubyBreaker/Runtime/TypeSigUnparser.html">RubyBreaker::Runtime::TypeSigUnparser</a>
|
|
144
138
|
|
|
145
|
-
<li><a href="../../RubyBreaker/
|
|
139
|
+
<li><a href="../../RubyBreaker/Runtime/TypeSystem.html">RubyBreaker::Runtime::TypeSystem</a>
|
|
146
140
|
|
|
147
141
|
<li><a href="../../RubyBreaker/TypeComparer.html">RubyBreaker::TypeComparer</a>
|
|
148
142
|
|
|
@@ -180,6 +174,18 @@
|
|
|
180
174
|
|
|
181
175
|
<li><a href="../../RubyBreaker/Util.html">RubyBreaker::Util</a>
|
|
182
176
|
|
|
177
|
+
<li><a href="../../Test.html">Test</a>
|
|
178
|
+
|
|
179
|
+
<li><a href="../../Test/Unit.html">Test::Unit</a>
|
|
180
|
+
|
|
181
|
+
<li><a href="../../Test/Unit/TestCase.html">Test::Unit::TestCase</a>
|
|
182
|
+
|
|
183
|
+
<li><a href="../../Rake.html">Rake</a>
|
|
184
|
+
|
|
185
|
+
<li><a href="../../Rake/RubyBreakerTestTask.html">Rake::RubyBreakerTestTask</a>
|
|
186
|
+
|
|
187
|
+
<li><a href="../../Kernel.html">Kernel</a>
|
|
188
|
+
|
|
183
189
|
<li><a href="../../Object.html">Object</a>
|
|
184
190
|
|
|
185
191
|
</ul>
|
|
@@ -94,8 +94,6 @@
|
|
|
94
94
|
|
|
95
95
|
<li><a href="../../RubyBreaker/Broken.html">RubyBreaker::Broken</a>
|
|
96
96
|
|
|
97
|
-
<li><a href="../../RubyBreaker/Broken/BrokenEigen.html">RubyBreaker::Broken::BrokenEigen</a>
|
|
98
|
-
|
|
99
97
|
<li><a href="../../RubyBreaker/Context.html">RubyBreaker::Context</a>
|
|
100
98
|
|
|
101
99
|
<li><a href="../../RubyBreaker/Errors.html">RubyBreaker::Errors</a>
|
|
@@ -112,12 +110,12 @@
|
|
|
112
110
|
|
|
113
111
|
<li><a href="../../RubyBreaker/Errors/UserError.html">RubyBreaker::Errors::UserError</a>
|
|
114
112
|
|
|
115
|
-
<li><a href="../../RubyBreaker/Main.html">RubyBreaker::Main</a>
|
|
116
|
-
|
|
117
113
|
<li><a href="../../RubyBreaker/ObjectPosition.html">RubyBreaker::ObjectPosition</a>
|
|
118
114
|
|
|
119
115
|
<li><a href="../../RubyBreaker/Position.html">RubyBreaker::Position</a>
|
|
120
116
|
|
|
117
|
+
<li><a href="../../RubyBreaker/RDocSupport.html">RubyBreaker::RDocSupport</a>
|
|
118
|
+
|
|
121
119
|
<li><a href="../../RubyBreaker/RubyTypeUtils.html">RubyBreaker::RubyTypeUtils</a>
|
|
122
120
|
|
|
123
121
|
<li><a href="../../RubyBreaker/Runtime.html">RubyBreaker::Runtime</a>
|
|
@@ -138,15 +136,11 @@
|
|
|
138
136
|
|
|
139
137
|
<li><a href="../../RubyBreaker/Runtime/Pluggable.html">RubyBreaker::Runtime::Pluggable</a>
|
|
140
138
|
|
|
141
|
-
<li><a href="../../RubyBreaker/Runtime/TypePlaceholder.html">RubyBreaker::Runtime::TypePlaceholder</a>
|
|
142
|
-
|
|
143
139
|
<li><a href="../../RubyBreaker/Runtime/TypeSigParser.html">RubyBreaker::Runtime::TypeSigParser</a>
|
|
144
140
|
|
|
145
|
-
<li><a href="../../RubyBreaker/Runtime/
|
|
146
|
-
|
|
147
|
-
<li><a href="../../RubyBreaker/Runtime/TypesigUnparser.html">RubyBreaker::Runtime::TypesigUnparser</a>
|
|
141
|
+
<li><a href="../../RubyBreaker/Runtime/TypeSigUnparser.html">RubyBreaker::Runtime::TypeSigUnparser</a>
|
|
148
142
|
|
|
149
|
-
<li><a href="../../RubyBreaker/
|
|
143
|
+
<li><a href="../../RubyBreaker/Runtime/TypeSystem.html">RubyBreaker::Runtime::TypeSystem</a>
|
|
150
144
|
|
|
151
145
|
<li><a href="../../RubyBreaker/TypeComparer.html">RubyBreaker::TypeComparer</a>
|
|
152
146
|
|
|
@@ -184,6 +178,18 @@
|
|
|
184
178
|
|
|
185
179
|
<li><a href="../../RubyBreaker/Util.html">RubyBreaker::Util</a>
|
|
186
180
|
|
|
181
|
+
<li><a href="../../Test.html">Test</a>
|
|
182
|
+
|
|
183
|
+
<li><a href="../../Test/Unit.html">Test::Unit</a>
|
|
184
|
+
|
|
185
|
+
<li><a href="../../Test/Unit/TestCase.html">Test::Unit::TestCase</a>
|
|
186
|
+
|
|
187
|
+
<li><a href="../../Rake.html">Rake</a>
|
|
188
|
+
|
|
189
|
+
<li><a href="../../Rake/RubyBreakerTestTask.html">Rake::RubyBreakerTestTask</a>
|
|
190
|
+
|
|
191
|
+
<li><a href="../../Kernel.html">Kernel</a>
|
|
192
|
+
|
|
187
193
|
<li><a href="../../Object.html">Object</a>
|
|
188
194
|
|
|
189
195
|
</ul>
|
|
@@ -257,7 +263,7 @@ actual work of gathering type information.</p>
|
|
|
257
263
|
|
|
258
264
|
|
|
259
265
|
<div class="method-source-code" id="new-source">
|
|
260
|
-
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/monitor.rb, line
|
|
266
|
+
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/monitor.rb, line 28</span>
|
|
261
267
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">mod</span>, <span class="ruby-identifier">pluggable</span>)
|
|
262
268
|
<span class="ruby-comment"># @mod = mod</span>
|
|
263
269
|
<span class="ruby-ivar">@pluggable</span> = <span class="ruby-identifier">pluggable</span>
|
|
@@ -294,7 +300,7 @@ actual work of gathering type information.</p>
|
|
|
294
300
|
|
|
295
301
|
|
|
296
302
|
<div class="method-source-code" id="monitor_after_method-source">
|
|
297
|
-
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/monitor.rb, line
|
|
303
|
+
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/monitor.rb, line 40</span>
|
|
298
304
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">monitor_after_method</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">meth_info</span>)
|
|
299
305
|
<span class="ruby-ivar">@pluggable</span>.<span class="ruby-identifier">after_method</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">meth_info</span>)
|
|
300
306
|
<span class="ruby-keyword">end</span></pre>
|
|
@@ -325,7 +331,7 @@ gather type information in the callee.</p>
|
|
|
325
331
|
|
|
326
332
|
|
|
327
333
|
<div class="method-source-code" id="monitor_before_method-source">
|
|
328
|
-
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/monitor.rb, line
|
|
334
|
+
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/monitor.rb, line 35</span>
|
|
329
335
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">monitor_before_method</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">meth_info</span>)
|
|
330
336
|
<span class="ruby-ivar">@pluggable</span>.<span class="ruby-identifier">before_method</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">meth_info</span>)
|
|
331
337
|
<span class="ruby-keyword">end</span></pre>
|
|
@@ -100,8 +100,6 @@
|
|
|
100
100
|
|
|
101
101
|
<li><a href="../../RubyBreaker/Broken.html">RubyBreaker::Broken</a>
|
|
102
102
|
|
|
103
|
-
<li><a href="../../RubyBreaker/Broken/BrokenEigen.html">RubyBreaker::Broken::BrokenEigen</a>
|
|
104
|
-
|
|
105
103
|
<li><a href="../../RubyBreaker/Context.html">RubyBreaker::Context</a>
|
|
106
104
|
|
|
107
105
|
<li><a href="../../RubyBreaker/Errors.html">RubyBreaker::Errors</a>
|
|
@@ -118,12 +116,12 @@
|
|
|
118
116
|
|
|
119
117
|
<li><a href="../../RubyBreaker/Errors/UserError.html">RubyBreaker::Errors::UserError</a>
|
|
120
118
|
|
|
121
|
-
<li><a href="../../RubyBreaker/Main.html">RubyBreaker::Main</a>
|
|
122
|
-
|
|
123
119
|
<li><a href="../../RubyBreaker/ObjectPosition.html">RubyBreaker::ObjectPosition</a>
|
|
124
120
|
|
|
125
121
|
<li><a href="../../RubyBreaker/Position.html">RubyBreaker::Position</a>
|
|
126
122
|
|
|
123
|
+
<li><a href="../../RubyBreaker/RDocSupport.html">RubyBreaker::RDocSupport</a>
|
|
124
|
+
|
|
127
125
|
<li><a href="../../RubyBreaker/RubyTypeUtils.html">RubyBreaker::RubyTypeUtils</a>
|
|
128
126
|
|
|
129
127
|
<li><a href="../../RubyBreaker/Runtime.html">RubyBreaker::Runtime</a>
|
|
@@ -144,15 +142,11 @@
|
|
|
144
142
|
|
|
145
143
|
<li><a href="../../RubyBreaker/Runtime/Pluggable.html">RubyBreaker::Runtime::Pluggable</a>
|
|
146
144
|
|
|
147
|
-
<li><a href="../../RubyBreaker/Runtime/TypePlaceholder.html">RubyBreaker::Runtime::TypePlaceholder</a>
|
|
148
|
-
|
|
149
145
|
<li><a href="../../RubyBreaker/Runtime/TypeSigParser.html">RubyBreaker::Runtime::TypeSigParser</a>
|
|
150
146
|
|
|
151
|
-
<li><a href="../../RubyBreaker/Runtime/
|
|
147
|
+
<li><a href="../../RubyBreaker/Runtime/TypeSigUnparser.html">RubyBreaker::Runtime::TypeSigUnparser</a>
|
|
152
148
|
|
|
153
|
-
<li><a href="../../RubyBreaker/Runtime/
|
|
154
|
-
|
|
155
|
-
<li><a href="../../RubyBreaker/TestCase.html">RubyBreaker::TestCase</a>
|
|
149
|
+
<li><a href="../../RubyBreaker/Runtime/TypeSystem.html">RubyBreaker::Runtime::TypeSystem</a>
|
|
156
150
|
|
|
157
151
|
<li><a href="../../RubyBreaker/TypeComparer.html">RubyBreaker::TypeComparer</a>
|
|
158
152
|
|
|
@@ -190,6 +184,18 @@
|
|
|
190
184
|
|
|
191
185
|
<li><a href="../../RubyBreaker/Util.html">RubyBreaker::Util</a>
|
|
192
186
|
|
|
187
|
+
<li><a href="../../Test.html">Test</a>
|
|
188
|
+
|
|
189
|
+
<li><a href="../../Test/Unit.html">Test::Unit</a>
|
|
190
|
+
|
|
191
|
+
<li><a href="../../Test/Unit/TestCase.html">Test::Unit::TestCase</a>
|
|
192
|
+
|
|
193
|
+
<li><a href="../../Rake.html">Rake</a>
|
|
194
|
+
|
|
195
|
+
<li><a href="../../Rake/RubyBreakerTestTask.html">Rake::RubyBreakerTestTask</a>
|
|
196
|
+
|
|
197
|
+
<li><a href="../../Kernel.html">Kernel</a>
|
|
198
|
+
|
|
193
199
|
<li><a href="../../Object.html">Object</a>
|
|
194
200
|
|
|
195
201
|
</ul>
|
|
@@ -241,29 +247,35 @@
|
|
|
241
247
|
|
|
242
248
|
|
|
243
249
|
<div class="method-source-code" id="install_module_monitor-source">
|
|
244
|
-
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/monitor.rb, line
|
|
250
|
+
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/monitor.rb, line 209</span>
|
|
245
251
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">install_module_monitor</span>(<span class="ruby-identifier">mod</span>)
|
|
246
252
|
|
|
247
253
|
<span class="ruby-constant">RubyBreaker</span>.<span class="ruby-identifier">log</span>(<span class="ruby-node">"Installing module monitor for #{mod}"</span>)
|
|
248
254
|
|
|
249
|
-
<span class="ruby-
|
|
250
|
-
<span class="ruby-
|
|
255
|
+
<span class="ruby-comment"># Do not re-install monitor if already done so.</span>
|
|
256
|
+
<span class="ruby-keyword">if</span> <span class="ruby-constant">MONITOR_MAP</span>[<span class="ruby-identifier">mod</span>]
|
|
257
|
+
<span class="ruby-constant">RubyBreaker</span>.<span class="ruby-identifier">log</span>(<span class="ruby-node">"Skip #{mod} as it has a monitor installed."</span>)
|
|
258
|
+
<span class="ruby-keyword">return</span>
|
|
259
|
+
<span class="ruby-keyword">end</span>
|
|
260
|
+
|
|
261
|
+
<span class="ruby-constant">MONITOR_MAP</span>[<span class="ruby-identifier">mod</span>] = <span class="ruby-constant">Monitor</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">mod</span>, <span class="ruby-constant">DEFAULT_TYPE_SYSTEM</span>)
|
|
251
262
|
|
|
252
|
-
<span class="ruby-
|
|
263
|
+
<span class="ruby-comment"># Create the type map if it does not exist already. Remember, this</span>
|
|
264
|
+
<span class="ruby-comment"># map could have been made by typesig().</span>
|
|
265
|
+
<span class="ruby-constant">TYPE_MAP</span>[<span class="ruby-identifier">mod</span>] = {} <span class="ruby-keyword">unless</span> <span class="ruby-constant">TYPE_MAP</span>[<span class="ruby-identifier">mod</span>]
|
|
266
|
+
|
|
267
|
+
<span class="ruby-comment"># Get the list of instance methods but do not include inherited</span>
|
|
268
|
+
<span class="ruby-comment"># methods. Those are part of the owner's not this module.</span>
|
|
253
269
|
<span class="ruby-identifier">meths</span> = <span class="ruby-identifier">mod</span>.<span class="ruby-identifier">instance_methods</span>(<span class="ruby-keyword">false</span>)
|
|
254
270
|
|
|
255
|
-
<span class="ruby-comment">#
|
|
256
|
-
<span class="ruby-
|
|
257
|
-
<span class="ruby-identifier">
|
|
258
|
-
<span class="ruby-identifier">broken_meths</span> = <span class="ruby-identifier">broken_meth_type_map</span>.<span class="ruby-identifier">keys</span>
|
|
271
|
+
<span class="ruby-comment"># See if any method is already broken (explicitly typesig'ed)</span>
|
|
272
|
+
<span class="ruby-identifier">broken_mt_map</span> = <span class="ruby-constant">Inspector</span>.<span class="ruby-identifier">inspect_all</span>(<span class="ruby-identifier">mod</span>)
|
|
273
|
+
<span class="ruby-identifier">broken_meths</span> = <span class="ruby-identifier">broken_mt_map</span>.<span class="ruby-identifier">keys</span>
|
|
259
274
|
|
|
260
275
|
<span class="ruby-identifier">meths</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span>
|
|
261
|
-
<span class="ruby-
|
|
262
|
-
<span class="ruby-comment"># Breakable (if the module is declared to be Breakable).</span>
|
|
263
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">broken_meths</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">m</span>)
|
|
264
|
-
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">rename_meth</span>(<span class="ruby-identifier">mod</span>,<span class="ruby-identifier">m</span>)
|
|
265
|
-
<span class="ruby-keyword">end</span>
|
|
276
|
+
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">rename_meth</span>(<span class="ruby-identifier">mod</span>,<span class="ruby-identifier">m</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">broken_meths</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">m</span>)
|
|
266
277
|
<span class="ruby-keyword">end</span>
|
|
278
|
+
|
|
267
279
|
<span class="ruby-keyword">end</span></pre>
|
|
268
280
|
</div><!-- install_module_monitor-source -->
|
|
269
281
|
|
|
@@ -291,7 +303,7 @@
|
|
|
291
303
|
|
|
292
304
|
|
|
293
305
|
<div class="method-source-code" id="is_module-3F-source">
|
|
294
|
-
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/monitor.rb, line
|
|
306
|
+
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/monitor.rb, line 188</span>
|
|
295
307
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">is_module?</span>(<span class="ruby-identifier">recv</span>)
|
|
296
308
|
<span class="ruby-keyword">return</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:class</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">recv</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Module</span>)
|
|
297
309
|
<span class="ruby-keyword">end</span></pre>
|
|
@@ -322,7 +334,7 @@ monitor for the class</p>
|
|
|
322
334
|
|
|
323
335
|
|
|
324
336
|
<div class="method-source-code" id="rename_meth-source">
|
|
325
|
-
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/monitor.rb, line
|
|
337
|
+
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/monitor.rb, line 194</span>
|
|
326
338
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">rename_meth</span>(<span class="ruby-identifier">recv</span>, <span class="ruby-identifier">meth_name</span>)
|
|
327
339
|
<span class="ruby-identifier">alt_meth_name</span> = <span class="ruby-constant">MonitorUtils</span>.<span class="ruby-identifier">get_alt_meth_name</span>(<span class="ruby-identifier">meth_name</span>)
|
|
328
340
|
<span class="ruby-identifier">recv</span>.<span class="ruby-identifier">module_eval</span>(<span class="ruby-node">"alias :\"#{alt_meth_name}\" :\"#{meth_name}\""</span>)
|
|
@@ -96,8 +96,6 @@
|
|
|
96
96
|
|
|
97
97
|
<li><a href="../../RubyBreaker/Broken.html">RubyBreaker::Broken</a>
|
|
98
98
|
|
|
99
|
-
<li><a href="../../RubyBreaker/Broken/BrokenEigen.html">RubyBreaker::Broken::BrokenEigen</a>
|
|
100
|
-
|
|
101
99
|
<li><a href="../../RubyBreaker/Context.html">RubyBreaker::Context</a>
|
|
102
100
|
|
|
103
101
|
<li><a href="../../RubyBreaker/Errors.html">RubyBreaker::Errors</a>
|
|
@@ -114,12 +112,12 @@
|
|
|
114
112
|
|
|
115
113
|
<li><a href="../../RubyBreaker/Errors/UserError.html">RubyBreaker::Errors::UserError</a>
|
|
116
114
|
|
|
117
|
-
<li><a href="../../RubyBreaker/Main.html">RubyBreaker::Main</a>
|
|
118
|
-
|
|
119
115
|
<li><a href="../../RubyBreaker/ObjectPosition.html">RubyBreaker::ObjectPosition</a>
|
|
120
116
|
|
|
121
117
|
<li><a href="../../RubyBreaker/Position.html">RubyBreaker::Position</a>
|
|
122
118
|
|
|
119
|
+
<li><a href="../../RubyBreaker/RDocSupport.html">RubyBreaker::RDocSupport</a>
|
|
120
|
+
|
|
123
121
|
<li><a href="../../RubyBreaker/RubyTypeUtils.html">RubyBreaker::RubyTypeUtils</a>
|
|
124
122
|
|
|
125
123
|
<li><a href="../../RubyBreaker/Runtime.html">RubyBreaker::Runtime</a>
|
|
@@ -140,15 +138,11 @@
|
|
|
140
138
|
|
|
141
139
|
<li><a href="../../RubyBreaker/Runtime/Pluggable.html">RubyBreaker::Runtime::Pluggable</a>
|
|
142
140
|
|
|
143
|
-
<li><a href="../../RubyBreaker/Runtime/TypePlaceholder.html">RubyBreaker::Runtime::TypePlaceholder</a>
|
|
144
|
-
|
|
145
141
|
<li><a href="../../RubyBreaker/Runtime/TypeSigParser.html">RubyBreaker::Runtime::TypeSigParser</a>
|
|
146
142
|
|
|
147
|
-
<li><a href="../../RubyBreaker/Runtime/
|
|
148
|
-
|
|
149
|
-
<li><a href="../../RubyBreaker/Runtime/TypesigUnparser.html">RubyBreaker::Runtime::TypesigUnparser</a>
|
|
143
|
+
<li><a href="../../RubyBreaker/Runtime/TypeSigUnparser.html">RubyBreaker::Runtime::TypeSigUnparser</a>
|
|
150
144
|
|
|
151
|
-
<li><a href="../../RubyBreaker/
|
|
145
|
+
<li><a href="../../RubyBreaker/Runtime/TypeSystem.html">RubyBreaker::Runtime::TypeSystem</a>
|
|
152
146
|
|
|
153
147
|
<li><a href="../../RubyBreaker/TypeComparer.html">RubyBreaker::TypeComparer</a>
|
|
154
148
|
|
|
@@ -186,6 +180,18 @@
|
|
|
186
180
|
|
|
187
181
|
<li><a href="../../RubyBreaker/Util.html">RubyBreaker::Util</a>
|
|
188
182
|
|
|
183
|
+
<li><a href="../../Test.html">Test</a>
|
|
184
|
+
|
|
185
|
+
<li><a href="../../Test/Unit.html">Test::Unit</a>
|
|
186
|
+
|
|
187
|
+
<li><a href="../../Test/Unit/TestCase.html">Test::Unit::TestCase</a>
|
|
188
|
+
|
|
189
|
+
<li><a href="../../Rake.html">Rake</a>
|
|
190
|
+
|
|
191
|
+
<li><a href="../../Rake/RubyBreakerTestTask.html">Rake::RubyBreakerTestTask</a>
|
|
192
|
+
|
|
193
|
+
<li><a href="../../Kernel.html">Kernel</a>
|
|
194
|
+
|
|
189
195
|
<li><a href="../../Object.html">Object</a>
|
|
190
196
|
|
|
191
197
|
</ul>
|
|
@@ -259,7 +265,7 @@ otherwise, it WILL fall into an infinite loop.</p>
|
|
|
259
265
|
|
|
260
266
|
|
|
261
267
|
<div class="method-source-code" id="new-source">
|
|
262
|
-
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/monitor.rb, line
|
|
268
|
+
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/monitor.rb, line 53</span>
|
|
263
269
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(); <span class="ruby-ivar">@switch</span> = <span class="ruby-keyword">true</span> <span class="ruby-keyword">end</span></pre>
|
|
264
270
|
</div><!-- new-source -->
|
|
265
271
|
|
|
@@ -293,7 +299,7 @@ otherwise, it WILL fall into an infinite loop.</p>
|
|
|
293
299
|
|
|
294
300
|
|
|
295
301
|
<div class="method-source-code" id="set_to-source">
|
|
296
|
-
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/monitor.rb, line
|
|
302
|
+
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/monitor.rb, line 65</span>
|
|
297
303
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">set_to</span>(<span class="ruby-identifier">mode</span>); <span class="ruby-ivar">@switch</span> = <span class="ruby-identifier">mode</span>; <span class="ruby-keyword">end</span></pre>
|
|
298
304
|
</div><!-- set_to-source -->
|
|
299
305
|
|
|
@@ -321,7 +327,7 @@ otherwise, it WILL fall into an infinite loop.</p>
|
|
|
321
327
|
|
|
322
328
|
|
|
323
329
|
<div class="method-source-code" id="turn_off-source">
|
|
324
|
-
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/monitor.rb, line
|
|
330
|
+
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/monitor.rb, line 60</span>
|
|
325
331
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">turn_off</span>();
|
|
326
332
|
<span class="ruby-constant">RubyBreaker</span>.<span class="ruby-identifier">log</span>(<span class="ruby-string">"Switch turned off"</span>)
|
|
327
333
|
<span class="ruby-ivar">@switch</span> = <span class="ruby-keyword">false</span>;
|
|
@@ -352,7 +358,7 @@ otherwise, it WILL fall into an infinite loop.</p>
|
|
|
352
358
|
|
|
353
359
|
|
|
354
360
|
<div class="method-source-code" id="turn_on-source">
|
|
355
|
-
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/monitor.rb, line
|
|
361
|
+
<pre><span class="ruby-comment"># File lib/rubybreaker/runtime/monitor.rb, line 55</span>
|
|
356
362
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">turn_on</span>();
|
|
357
363
|
<span class="ruby-constant">RubyBreaker</span>.<span class="ruby-identifier">log</span>(<span class="ruby-string">"Switch turned on"</span>)
|
|
358
364
|
<span class="ruby-ivar">@switch</span> = <span class="ruby-keyword">true</span>;
|