enhanced_errors 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardoc/checksums +1 -1
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/doc/Enhanced/Colors.html +2 -2
- data/doc/Enhanced.html +2 -2
- data/doc/EnhancedErrors.html +404 -291
- data/doc/Exception.html +2 -2
- data/doc/Minitest.html +2 -2
- data/doc/_index.html +2 -2
- data/doc/file.README.html +3 -3
- data/doc/index.html +3 -3
- data/doc/method_list.html +43 -27
- data/doc/top-level-namespace.html +2 -2
- data/enhanced_errors.gemspec +1 -1
- data/lib/enhanced_errors.rb +90 -87
- metadata +2 -2
data/doc/EnhancedErrors.html
CHANGED
@@ -118,11 +118,6 @@
|
|
118
118
|
</dt>
|
119
119
|
<dd><pre class="code"><span class='tstring'><span class='regexp_beg'>%r{</span><span class='tstring_content'>[\/\\]gems[\/\\]</span><span class='regexp_end'>}</span></span></pre></dd>
|
120
120
|
|
121
|
-
<dt id="RSPEC_EXAMPLE_REGEXP-constant" class="">RSPEC_EXAMPLE_REGEXP =
|
122
|
-
|
123
|
-
</dt>
|
124
|
-
<dd><pre class="code"><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>RSpec::ExampleGroups::[A-Z0-9]+.*</span><span class='regexp_end'>/</span></span></pre></dd>
|
125
|
-
|
126
121
|
<dt id="DEFAULT_MAX_LENGTH-constant" class="">DEFAULT_MAX_LENGTH =
|
127
122
|
|
128
123
|
</dt>
|
@@ -300,7 +295,7 @@
|
|
300
295
|
<li class="public ">
|
301
296
|
<span class="summary_signature">
|
302
297
|
|
303
|
-
<a href="#
|
298
|
+
<a href="#exception_trace-class_method" title="exception_trace (class method)">.<strong>exception_trace</strong> ⇒ Object </a>
|
304
299
|
|
305
300
|
|
306
301
|
|
@@ -318,7 +313,7 @@
|
|
318
313
|
|
319
314
|
|
320
315
|
<span class="summary_desc"><div class='inline'>
|
321
|
-
<p>Returns the value of attribute
|
316
|
+
<p>Returns the value of attribute exception_trace.</p>
|
322
317
|
</div></span>
|
323
318
|
|
324
319
|
</li>
|
@@ -327,7 +322,7 @@
|
|
327
322
|
<li class="public ">
|
328
323
|
<span class="summary_signature">
|
329
324
|
|
330
|
-
<a href="#
|
325
|
+
<a href="#on_capture_hook-class_method" title="on_capture_hook (class method)">.<strong>on_capture_hook</strong> ⇒ Object </a>
|
331
326
|
|
332
327
|
|
333
328
|
|
@@ -345,7 +340,7 @@
|
|
345
340
|
|
346
341
|
|
347
342
|
<span class="summary_desc"><div class='inline'>
|
348
|
-
<p>Returns the value of attribute
|
343
|
+
<p>Returns the value of attribute on_capture_hook.</p>
|
349
344
|
</div></span>
|
350
345
|
|
351
346
|
</li>
|
@@ -354,7 +349,7 @@
|
|
354
349
|
<li class="public ">
|
355
350
|
<span class="summary_signature">
|
356
351
|
|
357
|
-
<a href="#
|
352
|
+
<a href="#override_messages-class_method" title="override_messages (class method)">.<strong>override_messages</strong> ⇒ Object </a>
|
358
353
|
|
359
354
|
|
360
355
|
|
@@ -372,7 +367,7 @@
|
|
372
367
|
|
373
368
|
|
374
369
|
<span class="summary_desc"><div class='inline'>
|
375
|
-
<p>Returns the value of attribute
|
370
|
+
<p>Returns the value of attribute override_messages.</p>
|
376
371
|
</div></span>
|
377
372
|
|
378
373
|
</li>
|
@@ -518,6 +513,28 @@
|
|
518
513
|
|
519
514
|
|
520
515
|
|
516
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
517
|
+
|
518
|
+
</li>
|
519
|
+
|
520
|
+
|
521
|
+
<li class="public ">
|
522
|
+
<span class="summary_signature">
|
523
|
+
|
524
|
+
<a href="#capture_limit_exceeded%3F-class_method" title="capture_limit_exceeded? (class method)">.<strong>capture_limit_exceeded?</strong> ⇒ Boolean </a>
|
525
|
+
|
526
|
+
|
527
|
+
|
528
|
+
</span>
|
529
|
+
|
530
|
+
|
531
|
+
|
532
|
+
|
533
|
+
|
534
|
+
|
535
|
+
|
536
|
+
|
537
|
+
|
521
538
|
<span class="summary_desc"><div class='inline'></div></span>
|
522
539
|
|
523
540
|
</li>
|
@@ -614,7 +631,7 @@
|
|
614
631
|
<li class="public ">
|
615
632
|
<span class="summary_signature">
|
616
633
|
|
617
|
-
<a href="#
|
634
|
+
<a href="#disable_capturing!-class_method" title="disable_capturing! (class method)">.<strong>disable_capturing!</strong> ⇒ Object </a>
|
618
635
|
|
619
636
|
|
620
637
|
|
@@ -636,7 +653,7 @@
|
|
636
653
|
<li class="public ">
|
637
654
|
<span class="summary_signature">
|
638
655
|
|
639
|
-
<a href="#
|
656
|
+
<a href="#enforce_capture_limit!-class_method" title="enforce_capture_limit! (class method)">.<strong>enforce_capture_limit!</strong> ⇒ Object </a>
|
640
657
|
|
641
658
|
|
642
659
|
|
@@ -658,7 +675,7 @@
|
|
658
675
|
<li class="public ">
|
659
676
|
<span class="summary_signature">
|
660
677
|
|
661
|
-
<a href="#
|
678
|
+
<a href="#enhance_exceptions!-class_method" title="enhance_exceptions! (class method)">.<strong>enhance_exceptions!</strong>(enabled: true, debug: false, capture_events: nil, override_messages: false, **options, &block) ⇒ Object </a>
|
662
679
|
|
663
680
|
|
664
681
|
|
@@ -680,7 +697,7 @@
|
|
680
697
|
<li class="public ">
|
681
698
|
<span class="summary_signature">
|
682
699
|
|
683
|
-
<a href="#
|
700
|
+
<a href="#format-class_method" title="format (class method)">.<strong>format</strong>(captured_binding_infos = [], output_format = get_default_format_for_environment) ⇒ Object </a>
|
684
701
|
|
685
702
|
|
686
703
|
|
@@ -702,7 +719,7 @@
|
|
702
719
|
<li class="public ">
|
703
720
|
<span class="summary_signature">
|
704
721
|
|
705
|
-
<a href="#
|
722
|
+
<a href="#get_default_format_for_environment-class_method" title="get_default_format_for_environment (class method)">.<strong>get_default_format_for_environment</strong> ⇒ Object </a>
|
706
723
|
|
707
724
|
|
708
725
|
|
@@ -724,7 +741,7 @@
|
|
724
741
|
<li class="public ">
|
725
742
|
<span class="summary_signature">
|
726
743
|
|
727
|
-
<a href="#
|
744
|
+
<a href="#increment_capture_events_count-class_method" title="increment_capture_events_count (class method)">.<strong>increment_capture_events_count</strong> ⇒ Object </a>
|
728
745
|
|
729
746
|
|
730
747
|
|
@@ -746,7 +763,7 @@
|
|
746
763
|
<li class="public ">
|
747
764
|
<span class="summary_signature">
|
748
765
|
|
749
|
-
<a href="#
|
766
|
+
<a href="#is_a_minitest%3F-class_method" title="is_a_minitest? (class method)">.<strong>is_a_minitest?</strong>(klass) ⇒ Boolean </a>
|
750
767
|
|
751
768
|
|
752
769
|
|
@@ -768,7 +785,7 @@
|
|
768
785
|
<li class="public ">
|
769
786
|
<span class="summary_signature">
|
770
787
|
|
771
|
-
<a href="#
|
788
|
+
<a href="#is_rspec_example%3F-class_method" title="is_rspec_example? (class method)">.<strong>is_rspec_example?</strong>(tracepoint) ⇒ Boolean </a>
|
772
789
|
|
773
790
|
|
774
791
|
|
@@ -790,7 +807,7 @@
|
|
790
807
|
<li class="public ">
|
791
808
|
<span class="summary_signature">
|
792
809
|
|
793
|
-
<a href="#
|
810
|
+
<a href="#max_capture_events-class_method" title="max_capture_events (class method)">.<strong>max_capture_events</strong> ⇒ Object </a>
|
794
811
|
|
795
812
|
|
796
813
|
|
@@ -812,7 +829,7 @@
|
|
812
829
|
<li class="public ">
|
813
830
|
<span class="summary_signature">
|
814
831
|
|
815
|
-
<a href="#
|
832
|
+
<a href="#max_capture_events=-class_method" title="max_capture_events= (class method)">.<strong>max_capture_events=</strong>(value) ⇒ Object </a>
|
816
833
|
|
817
834
|
|
818
835
|
|
@@ -834,7 +851,7 @@
|
|
834
851
|
<li class="public ">
|
835
852
|
<span class="summary_signature">
|
836
853
|
|
837
|
-
<a href="#
|
854
|
+
<a href="#max_length-class_method" title="max_length (class method)">.<strong>max_length</strong>(value = nil) ⇒ Object </a>
|
838
855
|
|
839
856
|
|
840
857
|
|
@@ -856,7 +873,7 @@
|
|
856
873
|
<li class="public ">
|
857
874
|
<span class="summary_signature">
|
858
875
|
|
859
|
-
<a href="#
|
876
|
+
<a href="#mutex-class_method" title="mutex (class method)">.<strong>mutex</strong> ⇒ Object </a>
|
860
877
|
|
861
878
|
|
862
879
|
|
@@ -878,7 +895,7 @@
|
|
878
895
|
<li class="public ">
|
879
896
|
<span class="summary_signature">
|
880
897
|
|
881
|
-
<a href="#
|
898
|
+
<a href="#on_capture-class_method" title="on_capture (class method)">.<strong>on_capture</strong>(&block) ⇒ Object </a>
|
882
899
|
|
883
900
|
|
884
901
|
|
@@ -900,7 +917,7 @@
|
|
900
917
|
<li class="public ">
|
901
918
|
<span class="summary_signature">
|
902
919
|
|
903
|
-
<a href="#
|
920
|
+
<a href="#on_capture=-class_method" title="on_capture= (class method)">.<strong>on_capture=</strong>(value) ⇒ Object </a>
|
904
921
|
|
905
922
|
|
906
923
|
|
@@ -922,7 +939,7 @@
|
|
922
939
|
<li class="public ">
|
923
940
|
<span class="summary_signature">
|
924
941
|
|
925
|
-
<a href="#
|
942
|
+
<a href="#on_format-class_method" title="on_format (class method)">.<strong>on_format</strong>(&block) ⇒ Object </a>
|
926
943
|
|
927
944
|
|
928
945
|
|
@@ -944,7 +961,7 @@
|
|
944
961
|
<li class="public ">
|
945
962
|
<span class="summary_signature">
|
946
963
|
|
947
|
-
<a href="#
|
964
|
+
<a href="#on_format=-class_method" title="on_format= (class method)">.<strong>on_format=</strong>(value) ⇒ Object </a>
|
948
965
|
|
949
966
|
|
950
967
|
|
@@ -966,7 +983,7 @@
|
|
966
983
|
<li class="public ">
|
967
984
|
<span class="summary_signature">
|
968
985
|
|
969
|
-
<a href="#
|
986
|
+
<a href="#override_exception_message-class_method" title="override_exception_message (class method)">.<strong>override_exception_message</strong>(exception, binding_or_bindings) ⇒ Object </a>
|
970
987
|
|
971
988
|
|
972
989
|
|
@@ -988,7 +1005,7 @@
|
|
988
1005
|
<li class="public ">
|
989
1006
|
<span class="summary_signature">
|
990
1007
|
|
991
|
-
<a href="#
|
1008
|
+
<a href="#override_rspec_message-class_method" title="override_rspec_message (class method)">.<strong>override_rspec_message</strong>(example, binding_or_bindings) ⇒ Object </a>
|
992
1009
|
|
993
1010
|
|
994
1011
|
|
@@ -1010,7 +1027,7 @@
|
|
1010
1027
|
<li class="public ">
|
1011
1028
|
<span class="summary_signature">
|
1012
1029
|
|
1013
|
-
<a href="#
|
1030
|
+
<a href="#reset_capture_events_count-class_method" title="reset_capture_events_count (class method)">.<strong>reset_capture_events_count</strong> ⇒ Object </a>
|
1014
1031
|
|
1015
1032
|
|
1016
1033
|
|
@@ -1032,7 +1049,29 @@
|
|
1032
1049
|
<li class="public ">
|
1033
1050
|
<span class="summary_signature">
|
1034
1051
|
|
1035
|
-
<a href="#
|
1052
|
+
<a href="#running_in_ci%3F-class_method" title="running_in_ci? (class method)">.<strong>running_in_ci?</strong> ⇒ Boolean </a>
|
1053
|
+
|
1054
|
+
|
1055
|
+
|
1056
|
+
</span>
|
1057
|
+
|
1058
|
+
|
1059
|
+
|
1060
|
+
|
1061
|
+
|
1062
|
+
|
1063
|
+
|
1064
|
+
|
1065
|
+
|
1066
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
1067
|
+
|
1068
|
+
</li>
|
1069
|
+
|
1070
|
+
|
1071
|
+
<li class="public ">
|
1072
|
+
<span class="summary_signature">
|
1073
|
+
|
1074
|
+
<a href="#safe_prepend_module-class_method" title="safe_prepend_module (class method)">.<strong>safe_prepend_module</strong>(target_class, mod) ⇒ Object </a>
|
1036
1075
|
|
1037
1076
|
|
1038
1077
|
|
@@ -1326,11 +1365,11 @@
|
|
1326
1365
|
</div>
|
1327
1366
|
|
1328
1367
|
|
1329
|
-
<span id="
|
1368
|
+
<span id="exception_trace=-class_method"></span>
|
1330
1369
|
<div class="method_details ">
|
1331
|
-
<h3 class="signature " id="
|
1370
|
+
<h3 class="signature " id="exception_trace-class_method">
|
1332
1371
|
|
1333
|
-
.<strong>
|
1372
|
+
.<strong>exception_trace</strong> ⇒ <tt>Object</tt>
|
1334
1373
|
|
1335
1374
|
|
1336
1375
|
|
@@ -1339,7 +1378,7 @@
|
|
1339
1378
|
</h3><div class="docstring">
|
1340
1379
|
<div class="discussion">
|
1341
1380
|
|
1342
|
-
<p>Returns the value of attribute
|
1381
|
+
<p>Returns the value of attribute exception_trace.</p>
|
1343
1382
|
|
1344
1383
|
|
1345
1384
|
</div>
|
@@ -1360,8 +1399,8 @@
|
|
1360
1399
|
<td>
|
1361
1400
|
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 24</span>
|
1362
1401
|
|
1363
|
-
<span class='kw'>def</span> <span class='id identifier
|
1364
|
-
<span class='ivar'>@
|
1402
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_exception_trace'>exception_trace</span>
|
1403
|
+
<span class='ivar'>@exception_trace</span>
|
1365
1404
|
<span class='kw'>end</span></pre>
|
1366
1405
|
</td>
|
1367
1406
|
</tr>
|
@@ -1369,11 +1408,11 @@
|
|
1369
1408
|
</div>
|
1370
1409
|
|
1371
1410
|
|
1372
|
-
<span id="
|
1411
|
+
<span id="on_capture_hook=-class_method"></span>
|
1373
1412
|
<div class="method_details ">
|
1374
|
-
<h3 class="signature " id="
|
1413
|
+
<h3 class="signature " id="on_capture_hook-class_method">
|
1375
1414
|
|
1376
|
-
.<strong>
|
1415
|
+
.<strong>on_capture_hook</strong> ⇒ <tt>Object</tt>
|
1377
1416
|
|
1378
1417
|
|
1379
1418
|
|
@@ -1382,7 +1421,7 @@
|
|
1382
1421
|
</h3><div class="docstring">
|
1383
1422
|
<div class="discussion">
|
1384
1423
|
|
1385
|
-
<p>Returns the value of attribute
|
1424
|
+
<p>Returns the value of attribute on_capture_hook.</p>
|
1386
1425
|
|
1387
1426
|
|
1388
1427
|
</div>
|
@@ -1403,8 +1442,8 @@
|
|
1403
1442
|
<td>
|
1404
1443
|
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 24</span>
|
1405
1444
|
|
1406
|
-
<span class='kw'>def</span> <span class='id identifier
|
1407
|
-
<span class='ivar'>@
|
1445
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_on_capture_hook'>on_capture_hook</span>
|
1446
|
+
<span class='ivar'>@on_capture_hook</span>
|
1408
1447
|
<span class='kw'>end</span></pre>
|
1409
1448
|
</td>
|
1410
1449
|
</tr>
|
@@ -1412,11 +1451,11 @@
|
|
1412
1451
|
</div>
|
1413
1452
|
|
1414
1453
|
|
1415
|
-
<span id="
|
1454
|
+
<span id="override_messages=-class_method"></span>
|
1416
1455
|
<div class="method_details ">
|
1417
|
-
<h3 class="signature " id="
|
1456
|
+
<h3 class="signature " id="override_messages-class_method">
|
1418
1457
|
|
1419
|
-
.<strong>
|
1458
|
+
.<strong>override_messages</strong> ⇒ <tt>Object</tt>
|
1420
1459
|
|
1421
1460
|
|
1422
1461
|
|
@@ -1425,7 +1464,7 @@
|
|
1425
1464
|
</h3><div class="docstring">
|
1426
1465
|
<div class="discussion">
|
1427
1466
|
|
1428
|
-
<p>Returns the value of attribute
|
1467
|
+
<p>Returns the value of attribute override_messages.</p>
|
1429
1468
|
|
1430
1469
|
|
1431
1470
|
</div>
|
@@ -1446,8 +1485,8 @@
|
|
1446
1485
|
<td>
|
1447
1486
|
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 24</span>
|
1448
1487
|
|
1449
|
-
<span class='kw'>def</span> <span class='id identifier
|
1450
|
-
<span class='ivar'>@
|
1488
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_override_messages'>override_messages</span>
|
1489
|
+
<span class='ivar'>@override_messages</span>
|
1451
1490
|
<span class='kw'>end</span></pre>
|
1452
1491
|
</td>
|
1453
1492
|
</tr>
|
@@ -1476,14 +1515,14 @@
|
|
1476
1515
|
<pre class="lines">
|
1477
1516
|
|
1478
1517
|
|
1479
|
-
|
1480
|
-
|
1481
|
-
|
1482
|
-
|
1483
|
-
|
1518
|
+
232
|
1519
|
+
233
|
1520
|
+
234
|
1521
|
+
235
|
1522
|
+
236</pre>
|
1484
1523
|
</td>
|
1485
1524
|
<td>
|
1486
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
1525
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 232</span>
|
1487
1526
|
|
1488
1527
|
<span class='kw'>def</span> <span class='id identifier rubyid_add_to_skip_list'>add_to_skip_list</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_vars'>vars</span><span class='rparen'>)</span>
|
1489
1528
|
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
@@ -1510,8 +1549,6 @@
|
|
1510
1549
|
<pre class="lines">
|
1511
1550
|
|
1512
1551
|
|
1513
|
-
540
|
1514
|
-
541
|
1515
1552
|
542
|
1516
1553
|
543
|
1517
1554
|
544
|
@@ -1520,10 +1557,12 @@
|
|
1520
1557
|
547
|
1521
1558
|
548
|
1522
1559
|
549
|
1523
|
-
550
|
1560
|
+
550
|
1561
|
+
551
|
1562
|
+
552</pre>
|
1524
1563
|
</td>
|
1525
1564
|
<td>
|
1526
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
1565
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 542</span>
|
1527
1566
|
|
1528
1567
|
<span class='kw'>def</span> <span class='id identifier rubyid_apply_skip_list'>apply_skip_list</span><span class='lparen'>(</span><span class='id identifier rubyid_binding_info'>binding_info</span><span class='rparen'>)</span>
|
1529
1568
|
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
@@ -1556,8 +1595,6 @@
|
|
1556
1595
|
<pre class="lines">
|
1557
1596
|
|
1558
1597
|
|
1559
|
-
559
|
1560
|
-
560
|
1561
1598
|
561
|
1562
1599
|
562
|
1563
1600
|
563
|
@@ -1599,10 +1636,12 @@
|
|
1599
1636
|
599
|
1600
1637
|
600
|
1601
1638
|
601
|
1602
|
-
602
|
1639
|
+
602
|
1640
|
+
603
|
1641
|
+
604</pre>
|
1603
1642
|
</td>
|
1604
1643
|
<td>
|
1605
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
1644
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 561</span>
|
1606
1645
|
|
1607
1646
|
<span class='kw'>def</span> <span class='id identifier rubyid_binding_info_string'>binding_info_string</span><span class='lparen'>(</span><span class='id identifier rubyid_binding_info'>binding_info</span><span class='rparen'>)</span>
|
1608
1647
|
<span class='id identifier rubyid_exception'>exception</span> <span class='op'>=</span> <span class='id identifier rubyid_safe_to_s'>safe_to_s</span><span class='lparen'>(</span><span class='id identifier rubyid_binding_info'>binding_info</span><span class='lbracket'>[</span><span class='symbol'>:exception</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
@@ -1668,16 +1707,16 @@
|
|
1668
1707
|
<pre class="lines">
|
1669
1708
|
|
1670
1709
|
|
1671
|
-
497
|
1672
|
-
498
|
1673
1710
|
499
|
1674
1711
|
500
|
1675
1712
|
501
|
1676
1713
|
502
|
1677
|
-
503
|
1714
|
+
503
|
1715
|
+
504
|
1716
|
+
505</pre>
|
1678
1717
|
</td>
|
1679
1718
|
<td>
|
1680
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
1719
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 499</span>
|
1681
1720
|
|
1682
1721
|
<span class='kw'>def</span> <span class='id identifier rubyid_binding_infos_array_to_string'>binding_infos_array_to_string</span><span class='lparen'>(</span><span class='id identifier rubyid_captured_bindings'>captured_bindings</span><span class='comma'>,</span> <span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='symbol'>:terminal</span><span class='rparen'>)</span>
|
1683
1722
|
<span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_captured_bindings'>captured_bindings</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='id identifier rubyid_captured_bindings'>captured_bindings</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
@@ -1706,15 +1745,15 @@
|
|
1706
1745
|
<pre class="lines">
|
1707
1746
|
|
1708
1747
|
|
1709
|
-
|
1710
|
-
|
1711
|
-
|
1748
|
+
122
|
1749
|
+
123
|
1750
|
+
124</pre>
|
1712
1751
|
</td>
|
1713
1752
|
<td>
|
1714
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
1753
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 122</span>
|
1715
1754
|
|
1716
1755
|
<span class='kw'>def</span> <span class='id identifier rubyid_capture_events_count'>capture_events_count</span>
|
1717
|
-
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='lbrace'>{</span> <span class='ivar'>@capture_events_count</span> <span class='rbrace'>}</span>
|
1756
|
+
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='lbrace'>{</span> <span class='ivar'>@capture_events_count</span> <span class='op'>||</span> <span class='int'>0</span> <span class='rbrace'>}</span>
|
1718
1757
|
<span class='kw'>end</span></pre>
|
1719
1758
|
</td>
|
1720
1759
|
</tr>
|
@@ -1736,12 +1775,12 @@
|
|
1736
1775
|
<pre class="lines">
|
1737
1776
|
|
1738
1777
|
|
1739
|
-
|
1740
|
-
|
1741
|
-
|
1778
|
+
126
|
1779
|
+
127
|
1780
|
+
128</pre>
|
1742
1781
|
</td>
|
1743
1782
|
<td>
|
1744
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
1783
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 126</span>
|
1745
1784
|
|
1746
1785
|
<span class='kw'>def</span> <span class='id identifier rubyid_capture_events_count='>capture_events_count=</span><span class='lparen'>(</span><span class='id identifier rubyid_val'>val</span><span class='rparen'>)</span>
|
1747
1786
|
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='lbrace'>{</span> <span class='ivar'>@capture_events_count</span> <span class='op'>=</span> <span class='id identifier rubyid_val'>val</span> <span class='rbrace'>}</span>
|
@@ -1749,6 +1788,62 @@
|
|
1749
1788
|
</td>
|
1750
1789
|
</tr>
|
1751
1790
|
</table>
|
1791
|
+
</div>
|
1792
|
+
|
1793
|
+
<div class="method_details ">
|
1794
|
+
<h3 class="signature " id="capture_limit_exceeded?-class_method">
|
1795
|
+
|
1796
|
+
.<strong>capture_limit_exceeded?</strong> ⇒ <tt>Boolean</tt>
|
1797
|
+
|
1798
|
+
|
1799
|
+
|
1800
|
+
|
1801
|
+
|
1802
|
+
</h3><div class="docstring">
|
1803
|
+
<div class="discussion">
|
1804
|
+
|
1805
|
+
|
1806
|
+
</div>
|
1807
|
+
</div>
|
1808
|
+
<div class="tags">
|
1809
|
+
|
1810
|
+
<p class="tag_title">Returns:</p>
|
1811
|
+
<ul class="return">
|
1812
|
+
|
1813
|
+
<li>
|
1814
|
+
|
1815
|
+
|
1816
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1817
|
+
|
1818
|
+
|
1819
|
+
|
1820
|
+
</li>
|
1821
|
+
|
1822
|
+
</ul>
|
1823
|
+
|
1824
|
+
</div><table class="source_code">
|
1825
|
+
<tr>
|
1826
|
+
<td>
|
1827
|
+
<pre class="lines">
|
1828
|
+
|
1829
|
+
|
1830
|
+
154
|
1831
|
+
155
|
1832
|
+
156
|
1833
|
+
157
|
1834
|
+
158</pre>
|
1835
|
+
</td>
|
1836
|
+
<td>
|
1837
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 154</span>
|
1838
|
+
|
1839
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_capture_limit_exceeded?'>capture_limit_exceeded?</span>
|
1840
|
+
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
1841
|
+
<span class='id identifier rubyid_max_capture_events'>max_capture_events</span> <span class='op'>></span> <span class='int'>0</span> <span class='op'>&&</span> <span class='id identifier rubyid_capture_events_count'>capture_events_count</span> <span class='op'>>=</span> <span class='id identifier rubyid_max_capture_events'>max_capture_events</span>
|
1842
|
+
<span class='kw'>end</span>
|
1843
|
+
<span class='kw'>end</span></pre>
|
1844
|
+
</td>
|
1845
|
+
</tr>
|
1846
|
+
</table>
|
1752
1847
|
</div>
|
1753
1848
|
|
1754
1849
|
<div class="method_details ">
|
@@ -1766,15 +1861,15 @@
|
|
1766
1861
|
<pre class="lines">
|
1767
1862
|
|
1768
1863
|
|
1769
|
-
|
1770
|
-
|
1771
|
-
|
1864
|
+
118
|
1865
|
+
119
|
1866
|
+
120</pre>
|
1772
1867
|
</td>
|
1773
1868
|
<td>
|
1774
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
1869
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 118</span>
|
1775
1870
|
|
1776
1871
|
<span class='kw'>def</span> <span class='id identifier rubyid_capture_rescue'>capture_rescue</span>
|
1777
|
-
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='lbrace'>{</span>
|
1872
|
+
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='lbrace'>{</span> <span class='ivar'>@capture_rescue</span> <span class='rbrace'>}</span>
|
1778
1873
|
<span class='kw'>end</span></pre>
|
1779
1874
|
</td>
|
1780
1875
|
</tr>
|
@@ -1796,12 +1891,12 @@
|
|
1796
1891
|
<pre class="lines">
|
1797
1892
|
|
1798
1893
|
|
1799
|
-
|
1800
|
-
|
1801
|
-
|
1894
|
+
114
|
1895
|
+
115
|
1896
|
+
116</pre>
|
1802
1897
|
</td>
|
1803
1898
|
<td>
|
1804
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
1899
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 114</span>
|
1805
1900
|
|
1806
1901
|
<span class='kw'>def</span> <span class='id identifier rubyid_capture_rescue='>capture_rescue=</span><span class='lparen'>(</span><span class='id identifier rubyid_val'>val</span><span class='rparen'>)</span>
|
1807
1902
|
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='lbrace'>{</span> <span class='ivar'>@capture_rescue</span> <span class='op'>=</span> <span class='id identifier rubyid_val'>val</span> <span class='rbrace'>}</span>
|
@@ -1826,22 +1921,22 @@
|
|
1826
1921
|
<pre class="lines">
|
1827
1922
|
|
1828
1923
|
|
1829
|
-
332
|
1830
1924
|
333
|
1831
1925
|
334
|
1832
1926
|
335
|
1833
1927
|
336
|
1834
1928
|
337
|
1835
1929
|
338
|
1836
|
-
339
|
1930
|
+
339
|
1931
|
+
340</pre>
|
1837
1932
|
</td>
|
1838
1933
|
<td>
|
1839
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
1934
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 333</span>
|
1840
1935
|
|
1841
1936
|
<span class='kw'>def</span> <span class='id identifier rubyid_class_to_string'>class_to_string</span><span class='lparen'>(</span><span class='id identifier rubyid_klass'>klass</span><span class='rparen'>)</span>
|
1842
1937
|
<span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_klass'>klass</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1843
1938
|
<span class='kw'>if</span> <span class='id identifier rubyid_klass'>klass</span><span class='period'>.</span><span class='id identifier rubyid_singleton_class?'>singleton_class?</span>
|
1844
|
-
<span class='id identifier rubyid_klass'>klass</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>#<Class:(.*?)></span><span class='regexp_end'>/</span></span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
|
1939
|
+
<span class='lparen'>(</span><span class='id identifier rubyid_match'>match</span> <span class='op'>=</span> <span class='id identifier rubyid_klass'>klass</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>#<Class:(.*?)></span><span class='regexp_end'>/</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_match'>match</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span> <span class='op'>:</span> <span class='id identifier rubyid_klass'>klass</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
1845
1940
|
<span class='kw'>else</span>
|
1846
1941
|
<span class='id identifier rubyid_klass'>klass</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
1847
1942
|
<span class='kw'>end</span>
|
@@ -1866,8 +1961,6 @@
|
|
1866
1961
|
<pre class="lines">
|
1867
1962
|
|
1868
1963
|
|
1869
|
-
394
|
1870
|
-
395
|
1871
1964
|
396
|
1872
1965
|
397
|
1873
1966
|
398
|
@@ -1905,10 +1998,12 @@
|
|
1905
1998
|
430
|
1906
1999
|
431
|
1907
2000
|
432
|
1908
|
-
433
|
2001
|
+
433
|
2002
|
+
434
|
2003
|
+
435</pre>
|
1909
2004
|
</td>
|
1910
2005
|
<td>
|
1911
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
2006
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 396</span>
|
1912
2007
|
|
1913
2008
|
<span class='kw'>def</span> <span class='id identifier rubyid_convert_binding_to_binding_info'>convert_binding_to_binding_info</span><span class='lparen'>(</span><span class='id identifier rubyid_b'>b</span><span class='comma'>,</span> <span class='label'>capture_let_variables:</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
1914
2009
|
<span class='id identifier rubyid_file'>file</span> <span class='op'>=</span> <span class='id identifier rubyid_b'>b</span><span class='period'>.</span><span class='id identifier rubyid_eval'>eval</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>__FILE__</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>rescue</span> <span class='kw'>nil</span>
|
@@ -1953,6 +2048,76 @@
|
|
1953
2048
|
</td>
|
1954
2049
|
</tr>
|
1955
2050
|
</table>
|
2051
|
+
</div>
|
2052
|
+
|
2053
|
+
<div class="method_details ">
|
2054
|
+
<h3 class="signature " id="disable_capturing!-class_method">
|
2055
|
+
|
2056
|
+
.<strong>disable_capturing!</strong> ⇒ <tt>Object</tt>
|
2057
|
+
|
2058
|
+
|
2059
|
+
|
2060
|
+
|
2061
|
+
|
2062
|
+
</h3><table class="source_code">
|
2063
|
+
<tr>
|
2064
|
+
<td>
|
2065
|
+
<pre class="lines">
|
2066
|
+
|
2067
|
+
|
2068
|
+
160
|
2069
|
+
161
|
2070
|
+
162
|
2071
|
+
163
|
2072
|
+
164
|
2073
|
+
165
|
2074
|
+
166
|
2075
|
+
167</pre>
|
2076
|
+
</td>
|
2077
|
+
<td>
|
2078
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 160</span>
|
2079
|
+
|
2080
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_disable_capturing!'>disable_capturing!</span>
|
2081
|
+
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
2082
|
+
<span class='ivar'>@enabled</span> <span class='op'>=</span> <span class='kw'>false</span>
|
2083
|
+
<span class='ivar'>@rspec_tracepoint</span><span class='op'>&.</span><span class='id identifier rubyid_disable'>disable</span>
|
2084
|
+
<span class='ivar'>@minitest_trace</span><span class='op'>&.</span><span class='id identifier rubyid_disable'>disable</span>
|
2085
|
+
<span class='ivar'>@exception_trace</span><span class='op'>&.</span><span class='id identifier rubyid_disable'>disable</span>
|
2086
|
+
<span class='kw'>end</span>
|
2087
|
+
<span class='kw'>end</span></pre>
|
2088
|
+
</td>
|
2089
|
+
</tr>
|
2090
|
+
</table>
|
2091
|
+
</div>
|
2092
|
+
|
2093
|
+
<div class="method_details ">
|
2094
|
+
<h3 class="signature " id="enforce_capture_limit!-class_method">
|
2095
|
+
|
2096
|
+
.<strong>enforce_capture_limit!</strong> ⇒ <tt>Object</tt>
|
2097
|
+
|
2098
|
+
|
2099
|
+
|
2100
|
+
|
2101
|
+
|
2102
|
+
</h3><table class="source_code">
|
2103
|
+
<tr>
|
2104
|
+
<td>
|
2105
|
+
<pre class="lines">
|
2106
|
+
|
2107
|
+
|
2108
|
+
150
|
2109
|
+
151
|
2110
|
+
152</pre>
|
2111
|
+
</td>
|
2112
|
+
<td>
|
2113
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 150</span>
|
2114
|
+
|
2115
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_enforce_capture_limit!'>enforce_capture_limit!</span>
|
2116
|
+
<span class='id identifier rubyid_disable_capturing!'>disable_capturing!</span> <span class='kw'>if</span> <span class='id identifier rubyid_capture_limit_exceeded?'>capture_limit_exceeded?</span>
|
2117
|
+
<span class='kw'>end</span></pre>
|
2118
|
+
</td>
|
2119
|
+
</tr>
|
2120
|
+
</table>
|
1956
2121
|
</div>
|
1957
2122
|
|
1958
2123
|
<div class="method_details ">
|
@@ -1970,15 +2135,6 @@
|
|
1970
2135
|
<pre class="lines">
|
1971
2136
|
|
1972
2137
|
|
1973
|
-
229
|
1974
|
-
230
|
1975
|
-
231
|
1976
|
-
232
|
1977
|
-
233
|
1978
|
-
234
|
1979
|
-
235
|
1980
|
-
236
|
1981
|
-
237
|
1982
2138
|
238
|
1983
2139
|
239
|
1984
2140
|
240
|
@@ -2026,15 +2182,26 @@
|
|
2026
2182
|
282
|
2027
2183
|
283
|
2028
2184
|
284
|
2029
|
-
285
|
2185
|
+
285
|
2186
|
+
286
|
2187
|
+
287
|
2188
|
+
288
|
2189
|
+
289
|
2190
|
+
290
|
2191
|
+
291
|
2192
|
+
292
|
2193
|
+
293
|
2194
|
+
294
|
2195
|
+
295
|
2196
|
+
296</pre>
|
2030
2197
|
</td>
|
2031
2198
|
<td>
|
2032
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
2199
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 238</span>
|
2033
2200
|
|
2034
2201
|
<span class='kw'>def</span> <span class='id identifier rubyid_enhance_exceptions!'>enhance_exceptions!</span><span class='lparen'>(</span><span class='label'>enabled:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>debug:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>capture_events:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>override_messages:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
2035
2202
|
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
2036
|
-
<span class='ivar'>@
|
2037
|
-
<span class='ivar'>@
|
2203
|
+
<span class='ivar'>@exception_trace</span><span class='op'>&.</span><span class='id identifier rubyid_disable'>disable</span>
|
2204
|
+
<span class='ivar'>@exception_trace</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
2038
2205
|
|
2039
2206
|
<span class='ivar'>@output_format</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
2040
2207
|
<span class='ivar'>@eligible_for_capture</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
@@ -2042,7 +2209,9 @@
|
|
2042
2209
|
<span class='ivar'>@override_messages</span> <span class='op'>=</span> <span class='id identifier rubyid_override_messages'>override_messages</span>
|
2043
2210
|
|
2044
2211
|
<span class='comment'># Ensure these are not nil
|
2045
|
-
</span> <span class='
|
2212
|
+
</span> <span class='kw'>if</span> <span class='ivar'>@max_capture_events</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
2213
|
+
<span class='ivar'>@max_capture_events</span> <span class='op'>=</span> <span class='op'>-</span><span class='int'>1</span>
|
2214
|
+
<span class='kw'>end</span>
|
2046
2215
|
<span class='ivar'>@capture_events_count</span> <span class='op'>=</span> <span class='int'>0</span>
|
2047
2216
|
|
2048
2217
|
<span class='ivar'>@rspec_failure_message_loaded</span> <span class='op'>=</span> <span class='kw'>true</span>
|
@@ -2078,13 +2247,13 @@
|
|
2078
2247
|
<span class='kw'>end</span>
|
2079
2248
|
|
2080
2249
|
<span class='id identifier rubyid_events'>events</span> <span class='op'>=</span> <span class='ivar'>@capture_events</span> <span class='op'>?</span> <span class='ivar'>@capture_events</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span> <span class='op'>:</span> <span class='id identifier rubyid_default_capture_events'>default_capture_events</span>
|
2081
|
-
<span class='ivar'>@
|
2250
|
+
<span class='ivar'>@exception_trace</span> <span class='op'>=</span> <span class='const'>TracePoint</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_events'>events</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_tp'>tp</span><span class='op'>|</span>
|
2082
2251
|
<span class='id identifier rubyid_handle_tracepoint_event'>handle_tracepoint_event</span><span class='lparen'>(</span><span class='id identifier rubyid_tp'>tp</span><span class='rparen'>)</span>
|
2083
2252
|
<span class='kw'>end</span>
|
2084
2253
|
|
2085
2254
|
<span class='comment'># Only enable trace if still enabled and not limited
|
2086
2255
|
</span> <span class='kw'>if</span> <span class='ivar'>@enabled</span> <span class='op'>&&</span> <span class='lparen'>(</span><span class='ivar'>@max_capture_events</span> <span class='op'>==</span> <span class='op'>-</span><span class='int'>1</span> <span class='op'>||</span> <span class='ivar'>@capture_events_count</span> <span class='op'><</span> <span class='ivar'>@max_capture_events</span><span class='rparen'>)</span>
|
2087
|
-
<span class='ivar'>@
|
2256
|
+
<span class='ivar'>@exception_trace</span><span class='period'>.</span><span class='id identifier rubyid_enable'>enable</span>
|
2088
2257
|
<span class='kw'>end</span>
|
2089
2258
|
<span class='kw'>end</span>
|
2090
2259
|
<span class='kw'>end</span></pre>
|
@@ -2108,8 +2277,6 @@
|
|
2108
2277
|
<pre class="lines">
|
2109
2278
|
|
2110
2279
|
|
2111
|
-
477
|
2112
|
-
478
|
2113
2280
|
479
|
2114
2281
|
480
|
2115
2282
|
481
|
@@ -2126,10 +2293,12 @@
|
|
2126
2293
|
492
|
2127
2294
|
493
|
2128
2295
|
494
|
2129
|
-
495
|
2296
|
+
495
|
2297
|
+
496
|
2298
|
+
497</pre>
|
2130
2299
|
</td>
|
2131
2300
|
<td>
|
2132
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
2301
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 479</span>
|
2133
2302
|
|
2134
2303
|
<span class='kw'>def</span> <span class='id identifier rubyid_format'>format</span><span class='lparen'>(</span><span class='id identifier rubyid_captured_binding_infos'>captured_binding_infos</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_output_format'>output_format</span> <span class='op'>=</span> <span class='id identifier rubyid_get_default_format_for_environment'>get_default_format_for_environment</span><span class='rparen'>)</span>
|
2135
2304
|
<span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_captured_binding_infos'>captured_binding_infos</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='id identifier rubyid_captured_binding_infos'>captured_binding_infos</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
@@ -2170,8 +2339,6 @@
|
|
2170
2339
|
<pre class="lines">
|
2171
2340
|
|
2172
2341
|
|
2173
|
-
505
|
2174
|
-
506
|
2175
2342
|
507
|
2176
2343
|
508
|
2177
2344
|
509
|
@@ -2187,10 +2354,12 @@
|
|
2187
2354
|
519
|
2188
2355
|
520
|
2189
2356
|
521
|
2190
|
-
522
|
2357
|
+
522
|
2358
|
+
523
|
2359
|
+
524</pre>
|
2191
2360
|
</td>
|
2192
2361
|
<td>
|
2193
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
2362
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 507</span>
|
2194
2363
|
|
2195
2364
|
<span class='kw'>def</span> <span class='id identifier rubyid_get_default_format_for_environment'>get_default_format_for_environment</span>
|
2196
2365
|
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
@@ -2230,32 +2399,22 @@
|
|
2230
2399
|
<pre class="lines">
|
2231
2400
|
|
2232
2401
|
|
2233
|
-
|
2234
|
-
|
2235
|
-
|
2236
|
-
|
2237
|
-
|
2238
|
-
|
2239
|
-
|
2240
|
-
159
|
2241
|
-
160
|
2242
|
-
161
|
2243
|
-
162
|
2244
|
-
163</pre>
|
2402
|
+
169
|
2403
|
+
170
|
2404
|
+
171
|
2405
|
+
172
|
2406
|
+
173
|
2407
|
+
174
|
2408
|
+
175</pre>
|
2245
2409
|
</td>
|
2246
2410
|
<td>
|
2247
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
2411
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 169</span>
|
2248
2412
|
|
2249
2413
|
<span class='kw'>def</span> <span class='id identifier rubyid_increment_capture_events_count'>increment_capture_events_count</span>
|
2250
2414
|
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
2251
2415
|
<span class='ivar'>@capture_events_count</span> <span class='op'>||=</span> <span class='int'>0</span>
|
2252
2416
|
<span class='ivar'>@max_capture_events</span> <span class='op'>||=</span> <span class='op'>-</span><span class='int'>1</span>
|
2253
2417
|
<span class='ivar'>@capture_events_count</span> <span class='op'>+=</span> <span class='int'>1</span>
|
2254
|
-
<span class='comment'># Check if we've hit the limit
|
2255
|
-
</span> <span class='kw'>if</span> <span class='ivar'>@max_capture_events</span> <span class='op'>></span> <span class='int'>0</span> <span class='op'>&&</span> <span class='ivar'>@capture_events_count</span> <span class='op'>>=</span> <span class='ivar'>@max_capture_events</span>
|
2256
|
-
<span class='comment'># puts "EnhancedErrors: max_capture_events limit (#{@max_capture_events}) reached, disabling capturing."
|
2257
|
-
</span> <span class='ivar'>@enabled</span> <span class='op'>=</span> <span class='kw'>false</span>
|
2258
|
-
<span class='kw'>end</span>
|
2259
2418
|
<span class='kw'>end</span>
|
2260
2419
|
<span class='kw'>end</span></pre>
|
2261
2420
|
</td>
|
@@ -2300,12 +2459,12 @@
|
|
2300
2459
|
<pre class="lines">
|
2301
2460
|
|
2302
2461
|
|
2462
|
+
309
|
2303
2463
|
310
|
2304
|
-
311
|
2305
|
-
312</pre>
|
2464
|
+
311</pre>
|
2306
2465
|
</td>
|
2307
2466
|
<td>
|
2308
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
2467
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 309</span>
|
2309
2468
|
|
2310
2469
|
<span class='kw'>def</span> <span class='id identifier rubyid_is_a_minitest?'>is_a_minitest?</span><span class='lparen'>(</span><span class='id identifier rubyid_klass'>klass</span><span class='rparen'>)</span>
|
2311
2470
|
<span class='id identifier rubyid_klass'>klass</span><span class='period'>.</span><span class='id identifier rubyid_ancestors'>ancestors</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Minitest.html" title="Minitest (module)">Minitest</a></span></span><span class='op'>::</span><span class='const'>Test</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_klass'>klass</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Minitest::Test</span><span class='tstring_end'>'</span></span>
|
@@ -2352,15 +2511,15 @@
|
|
2352
2511
|
<pre class="lines">
|
2353
2512
|
|
2354
2513
|
|
2355
|
-
341
|
2356
2514
|
342
|
2357
|
-
343
|
2515
|
+
343
|
2516
|
+
344</pre>
|
2358
2517
|
</td>
|
2359
2518
|
<td>
|
2360
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
2519
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 342</span>
|
2361
2520
|
|
2362
2521
|
<span class='kw'>def</span> <span class='id identifier rubyid_is_rspec_example?'>is_rspec_example?</span><span class='lparen'>(</span><span class='id identifier rubyid_tracepoint'>tracepoint</span><span class='rparen'>)</span>
|
2363
|
-
<span class='id identifier rubyid_tracepoint'>tracepoint</span><span class='period'>.</span><span class='id identifier rubyid_method_id'>method_id</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
2522
|
+
<span class='id identifier rubyid_tracepoint'>tracepoint</span><span class='period'>.</span><span class='id identifier rubyid_method_id'>method_id</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&&</span> <span class='op'>!</span><span class='lparen'>(</span><span class='id identifier rubyid_tracepoint'>tracepoint</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>rspec</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_tracepoint'>tracepoint</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_end_with?'>end_with?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>_spec.rb</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
2364
2523
|
<span class='kw'>end</span></pre>
|
2365
2524
|
</td>
|
2366
2525
|
</tr>
|
@@ -2382,15 +2541,15 @@
|
|
2382
2541
|
<pre class="lines">
|
2383
2542
|
|
2384
2543
|
|
2385
|
-
|
2386
|
-
|
2387
|
-
|
2544
|
+
130
|
2545
|
+
131
|
2546
|
+
132</pre>
|
2388
2547
|
</td>
|
2389
2548
|
<td>
|
2390
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
2549
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 130</span>
|
2391
2550
|
|
2392
2551
|
<span class='kw'>def</span> <span class='id identifier rubyid_max_capture_events'>max_capture_events</span>
|
2393
|
-
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='lbrace'>{</span> <span class='ivar'>@max_capture_events</span> <span class='rbrace'>}</span>
|
2552
|
+
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='lbrace'>{</span> <span class='ivar'>@max_capture_events</span> <span class='op'>||</span> <span class='op'>-</span><span class='int'>1</span> <span class='rbrace'>}</span>
|
2394
2553
|
<span class='kw'>end</span></pre>
|
2395
2554
|
</td>
|
2396
2555
|
</tr>
|
@@ -2412,6 +2571,8 @@
|
|
2412
2571
|
<pre class="lines">
|
2413
2572
|
|
2414
2573
|
|
2574
|
+
134
|
2575
|
+
135
|
2415
2576
|
136
|
2416
2577
|
137
|
2417
2578
|
138
|
@@ -2424,12 +2585,10 @@
|
|
2424
2585
|
145
|
2425
2586
|
146
|
2426
2587
|
147
|
2427
|
-
148
|
2428
|
-
149
|
2429
|
-
150</pre>
|
2588
|
+
148</pre>
|
2430
2589
|
</td>
|
2431
2590
|
<td>
|
2432
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
2591
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 134</span>
|
2433
2592
|
|
2434
2593
|
<span class='kw'>def</span> <span class='id identifier rubyid_max_capture_events='>max_capture_events=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
2435
2594
|
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
@@ -2439,7 +2598,7 @@
|
|
2439
2598
|
</span> <span class='kw'>if</span> <span class='ivar'>@enabled</span>
|
2440
2599
|
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>EnhancedErrors: max_capture_events set to 0, disabling capturing.</span><span class='tstring_end'>"</span></span>
|
2441
2600
|
<span class='ivar'>@enabled</span> <span class='op'>=</span> <span class='kw'>false</span>
|
2442
|
-
<span class='ivar'>@
|
2601
|
+
<span class='ivar'>@exception_trace</span><span class='op'>&.</span><span class='id identifier rubyid_disable'>disable</span>
|
2443
2602
|
<span class='ivar'>@rspec_tracepoint</span><span class='op'>&.</span><span class='id identifier rubyid_disable'>disable</span>
|
2444
2603
|
<span class='ivar'>@minitest_trace</span><span class='op'>&.</span><span class='id identifier rubyid_disable'>disable</span>
|
2445
2604
|
<span class='kw'>end</span>
|
@@ -2466,19 +2625,19 @@
|
|
2466
2625
|
<pre class="lines">
|
2467
2626
|
|
2468
2627
|
|
2469
|
-
|
2470
|
-
|
2471
|
-
|
2472
|
-
|
2473
|
-
|
2474
|
-
|
2475
|
-
|
2476
|
-
|
2477
|
-
|
2478
|
-
|
2628
|
+
183
|
2629
|
+
184
|
2630
|
+
185
|
2631
|
+
186
|
2632
|
+
187
|
2633
|
+
188
|
2634
|
+
189
|
2635
|
+
190
|
2636
|
+
191
|
2637
|
+
192</pre>
|
2479
2638
|
</td>
|
2480
2639
|
<td>
|
2481
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
2640
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 183</span>
|
2482
2641
|
|
2483
2642
|
<span class='kw'>def</span> <span class='id identifier rubyid_max_length'>max_length</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
2484
2643
|
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
@@ -2540,18 +2699,18 @@
|
|
2540
2699
|
<pre class="lines">
|
2541
2700
|
|
2542
2701
|
|
2543
|
-
445
|
2544
|
-
446
|
2545
2702
|
447
|
2546
2703
|
448
|
2547
2704
|
449
|
2548
2705
|
450
|
2549
2706
|
451
|
2550
2707
|
452
|
2551
|
-
453
|
2708
|
+
453
|
2709
|
+
454
|
2710
|
+
455</pre>
|
2552
2711
|
</td>
|
2553
2712
|
<td>
|
2554
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
2713
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 447</span>
|
2555
2714
|
|
2556
2715
|
<span class='kw'>def</span> <span class='id identifier rubyid_on_capture'>on_capture</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
2557
2716
|
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
@@ -2582,14 +2741,14 @@
|
|
2582
2741
|
<pre class="lines">
|
2583
2742
|
|
2584
2743
|
|
2585
|
-
455
|
2586
|
-
456
|
2587
2744
|
457
|
2588
2745
|
458
|
2589
|
-
459
|
2746
|
+
459
|
2747
|
+
460
|
2748
|
+
461</pre>
|
2590
2749
|
</td>
|
2591
2750
|
<td>
|
2592
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
2751
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 457</span>
|
2593
2752
|
|
2594
2753
|
<span class='kw'>def</span> <span class='id identifier rubyid_on_capture='>on_capture=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
2595
2754
|
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
@@ -2616,18 +2775,18 @@
|
|
2616
2775
|
<pre class="lines">
|
2617
2776
|
|
2618
2777
|
|
2619
|
-
461
|
2620
|
-
462
|
2621
2778
|
463
|
2622
2779
|
464
|
2623
2780
|
465
|
2624
2781
|
466
|
2625
2782
|
467
|
2626
2783
|
468
|
2627
|
-
469
|
2784
|
+
469
|
2785
|
+
470
|
2786
|
+
471</pre>
|
2628
2787
|
</td>
|
2629
2788
|
<td>
|
2630
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
2789
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 463</span>
|
2631
2790
|
|
2632
2791
|
<span class='kw'>def</span> <span class='id identifier rubyid_on_format'>on_format</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
2633
2792
|
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
@@ -2658,14 +2817,14 @@
|
|
2658
2817
|
<pre class="lines">
|
2659
2818
|
|
2660
2819
|
|
2661
|
-
471
|
2662
|
-
472
|
2663
2820
|
473
|
2664
2821
|
474
|
2665
|
-
475
|
2822
|
+
475
|
2823
|
+
476
|
2824
|
+
477</pre>
|
2666
2825
|
</td>
|
2667
2826
|
<td>
|
2668
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
2827
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 473</span>
|
2669
2828
|
|
2670
2829
|
<span class='kw'>def</span> <span class='id identifier rubyid_on_format='>on_format=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
2671
2830
|
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
@@ -2692,15 +2851,6 @@
|
|
2692
2851
|
<pre class="lines">
|
2693
2852
|
|
2694
2853
|
|
2695
|
-
204
|
2696
|
-
205
|
2697
|
-
206
|
2698
|
-
207
|
2699
|
-
208
|
2700
|
-
209
|
2701
|
-
210
|
2702
|
-
211
|
2703
|
-
212
|
2704
2854
|
213
|
2705
2855
|
214
|
2706
2856
|
215
|
@@ -2709,10 +2859,19 @@
|
|
2709
2859
|
218
|
2710
2860
|
219
|
2711
2861
|
220
|
2712
|
-
221
|
2862
|
+
221
|
2863
|
+
222
|
2864
|
+
223
|
2865
|
+
224
|
2866
|
+
225
|
2867
|
+
226
|
2868
|
+
227
|
2869
|
+
228
|
2870
|
+
229
|
2871
|
+
230</pre>
|
2713
2872
|
</td>
|
2714
2873
|
<td>
|
2715
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
2874
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 213</span>
|
2716
2875
|
|
2717
2876
|
<span class='kw'>def</span> <span class='id identifier rubyid_override_exception_message'>override_exception_message</span><span class='lparen'>(</span><span class='id identifier rubyid_exception'>exception</span><span class='comma'>,</span> <span class='id identifier rubyid_binding_or_bindings'>binding_or_bindings</span><span class='rparen'>)</span>
|
2718
2877
|
<span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_exception'>exception</span>
|
@@ -2752,21 +2911,21 @@
|
|
2752
2911
|
<pre class="lines">
|
2753
2912
|
|
2754
2913
|
|
2755
|
-
191
|
2756
|
-
192
|
2757
|
-
193
|
2758
|
-
194
|
2759
|
-
195
|
2760
|
-
196
|
2761
|
-
197
|
2762
|
-
198
|
2763
|
-
199
|
2764
2914
|
200
|
2765
2915
|
201
|
2766
|
-
202
|
2916
|
+
202
|
2917
|
+
203
|
2918
|
+
204
|
2919
|
+
205
|
2920
|
+
206
|
2921
|
+
207
|
2922
|
+
208
|
2923
|
+
209
|
2924
|
+
210
|
2925
|
+
211</pre>
|
2767
2926
|
</td>
|
2768
2927
|
<td>
|
2769
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
2928
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 200</span>
|
2770
2929
|
|
2771
2930
|
<span class='kw'>def</span> <span class='id identifier rubyid_override_rspec_message'>override_rspec_message</span><span class='lparen'>(</span><span class='id identifier rubyid_example'>example</span><span class='comma'>,</span> <span class='id identifier rubyid_binding_or_bindings'>binding_or_bindings</span><span class='rparen'>)</span>
|
2772
2931
|
<span class='id identifier rubyid_exception_obj'>exception_obj</span> <span class='op'>=</span> <span class='id identifier rubyid_example'>example</span><span class='period'>.</span><span class='id identifier rubyid_exception'>exception</span>
|
@@ -2800,24 +2959,18 @@
|
|
2800
2959
|
<pre class="lines">
|
2801
2960
|
|
2802
2961
|
|
2803
|
-
|
2804
|
-
|
2805
|
-
|
2806
|
-
|
2807
|
-
|
2808
|
-
170
|
2809
|
-
171
|
2810
|
-
172</pre>
|
2962
|
+
177
|
2963
|
+
178
|
2964
|
+
179
|
2965
|
+
180
|
2966
|
+
181</pre>
|
2811
2967
|
</td>
|
2812
2968
|
<td>
|
2813
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
2969
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 177</span>
|
2814
2970
|
|
2815
2971
|
<span class='kw'>def</span> <span class='id identifier rubyid_reset_capture_events_count'>reset_capture_events_count</span>
|
2816
2972
|
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
2817
2973
|
<span class='ivar'>@capture_events_count</span> <span class='op'>=</span> <span class='int'>0</span>
|
2818
|
-
<span class='ivar'>@enabled</span> <span class='op'>=</span> <span class='kw'>true</span>
|
2819
|
-
<span class='ivar'>@rspec_tracepoint</span><span class='period'>.</span><span class='id identifier rubyid_enable'>enable</span> <span class='kw'>if</span> <span class='ivar'>@rspec_tracepoint</span>
|
2820
|
-
<span class='ivar'>@trace</span><span class='period'>.</span><span class='id identifier rubyid_enable'>enable</span> <span class='kw'>if</span> <span class='ivar'>@trace</span>
|
2821
2974
|
<span class='kw'>end</span>
|
2822
2975
|
<span class='kw'>end</span></pre>
|
2823
2976
|
</td>
|
@@ -2862,8 +3015,6 @@
|
|
2862
3015
|
<pre class="lines">
|
2863
3016
|
|
2864
3017
|
|
2865
|
-
524
|
2866
|
-
525
|
2867
3018
|
526
|
2868
3019
|
527
|
2869
3020
|
528
|
@@ -2876,10 +3027,12 @@
|
|
2876
3027
|
535
|
2877
3028
|
536
|
2878
3029
|
537
|
2879
|
-
538
|
3030
|
+
538
|
3031
|
+
539
|
3032
|
+
540</pre>
|
2880
3033
|
</td>
|
2881
3034
|
<td>
|
2882
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
3035
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 526</span>
|
2883
3036
|
|
2884
3037
|
<span class='kw'>def</span> <span class='id identifier rubyid_running_in_ci?'>running_in_ci?</span>
|
2885
3038
|
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
@@ -2910,50 +3063,6 @@
|
|
2910
3063
|
|
2911
3064
|
|
2912
3065
|
|
2913
|
-
</h3><table class="source_code">
|
2914
|
-
<tr>
|
2915
|
-
<td>
|
2916
|
-
<pre class="lines">
|
2917
|
-
|
2918
|
-
|
2919
|
-
287
|
2920
|
-
288
|
2921
|
-
289
|
2922
|
-
290
|
2923
|
-
291
|
2924
|
-
292
|
2925
|
-
293
|
2926
|
-
294
|
2927
|
-
295
|
2928
|
-
296</pre>
|
2929
|
-
</td>
|
2930
|
-
<td>
|
2931
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 287</span>
|
2932
|
-
|
2933
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_safe_prepend_module'>safe_prepend_module</span><span class='lparen'>(</span><span class='id identifier rubyid_target_class'>target_class</span><span class='comma'>,</span> <span class='id identifier rubyid_mod'>mod</span><span class='rparen'>)</span>
|
2934
|
-
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
2935
|
-
<span class='kw'>if</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='id identifier rubyid_target_class'>target_class</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_target_class'>target_class</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Module</span><span class='rparen'>)</span>
|
2936
|
-
<span class='id identifier rubyid_target_class'>target_class</span><span class='period'>.</span><span class='id identifier rubyid_prepend'>prepend</span><span class='lparen'>(</span><span class='id identifier rubyid_mod'>mod</span><span class='rparen'>)</span>
|
2937
|
-
<span class='kw'>true</span>
|
2938
|
-
<span class='kw'>else</span>
|
2939
|
-
<span class='kw'>false</span>
|
2940
|
-
<span class='kw'>end</span>
|
2941
|
-
<span class='kw'>end</span>
|
2942
|
-
<span class='kw'>end</span></pre>
|
2943
|
-
</td>
|
2944
|
-
</tr>
|
2945
|
-
</table>
|
2946
|
-
</div>
|
2947
|
-
|
2948
|
-
<div class="method_details ">
|
2949
|
-
<h3 class="signature " id="safely_prepend_rspec_custom_failure_message-class_method">
|
2950
|
-
|
2951
|
-
.<strong>safely_prepend_rspec_custom_failure_message</strong> ⇒ <tt>Object</tt>
|
2952
|
-
|
2953
|
-
|
2954
|
-
|
2955
|
-
|
2956
|
-
|
2957
3066
|
</h3><table class="source_code">
|
2958
3067
|
<tr>
|
2959
3068
|
<td>
|
@@ -2969,22 +3078,20 @@
|
|
2969
3078
|
304
|
2970
3079
|
305
|
2971
3080
|
306
|
2972
|
-
307
|
2973
|
-
308</pre>
|
3081
|
+
307</pre>
|
2974
3082
|
</td>
|
2975
3083
|
<td>
|
2976
3084
|
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 298</span>
|
2977
3085
|
|
2978
|
-
<span class='kw'>def</span> <span class='id identifier
|
3086
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_safe_prepend_module'>safe_prepend_module</span><span class='lparen'>(</span><span class='id identifier rubyid_target_class'>target_class</span><span class='comma'>,</span> <span class='id identifier rubyid_mod'>mod</span><span class='rparen'>)</span>
|
2979
3087
|
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
2980
|
-
<span class='kw'>
|
2981
|
-
|
2982
|
-
<span class='
|
2983
|
-
|
3088
|
+
<span class='kw'>if</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='id identifier rubyid_target_class'>target_class</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_target_class'>target_class</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Module</span><span class='rparen'>)</span>
|
3089
|
+
<span class='id identifier rubyid_target_class'>target_class</span><span class='period'>.</span><span class='id identifier rubyid_prepend'>prepend</span><span class='lparen'>(</span><span class='id identifier rubyid_mod'>mod</span><span class='rparen'>)</span>
|
3090
|
+
<span class='kw'>true</span>
|
3091
|
+
<span class='kw'>else</span>
|
3092
|
+
<span class='kw'>false</span>
|
2984
3093
|
<span class='kw'>end</span>
|
2985
3094
|
<span class='kw'>end</span>
|
2986
|
-
<span class='kw'>rescue</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
2987
|
-
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Failed to prepend RSpec custom failure message: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
2988
3095
|
<span class='kw'>end</span></pre>
|
2989
3096
|
</td>
|
2990
3097
|
</tr>
|
@@ -3006,14 +3113,14 @@
|
|
3006
3113
|
<pre class="lines">
|
3007
3114
|
|
3008
3115
|
|
3009
|
-
|
3010
|
-
|
3011
|
-
|
3012
|
-
|
3013
|
-
|
3116
|
+
194
|
3117
|
+
195
|
3118
|
+
196
|
3119
|
+
197
|
3120
|
+
198</pre>
|
3014
3121
|
</td>
|
3015
3122
|
<td>
|
3016
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
3123
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 194</span>
|
3017
3124
|
|
3018
3125
|
<span class='kw'>def</span> <span class='id identifier rubyid_skip_list'>skip_list</span>
|
3019
3126
|
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
@@ -3040,6 +3147,7 @@
|
|
3040
3147
|
<pre class="lines">
|
3041
3148
|
|
3042
3149
|
|
3150
|
+
313
|
3043
3151
|
314
|
3044
3152
|
315
|
3045
3153
|
316
|
@@ -3051,9 +3159,10 @@
|
|
3051
3159
|
322</pre>
|
3052
3160
|
</td>
|
3053
3161
|
<td>
|
3054
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
3162
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 313</span>
|
3055
3163
|
|
3056
3164
|
<span class='kw'>def</span> <span class='id identifier rubyid_start_minitest_binding_capture'>start_minitest_binding_capture</span>
|
3165
|
+
<span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_capture_limit_exceeded?'>capture_limit_exceeded?</span>
|
3057
3166
|
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
3058
3167
|
<span class='ivar'>@minitest_trace</span> <span class='op'>=</span> <span class='const'>TracePoint</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:return</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_tp'>tp</span><span class='op'>|</span>
|
3059
3168
|
<span class='kw'>next</span> <span class='kw'>unless</span> <span class='id identifier rubyid_tp'>tp</span><span class='period'>.</span><span class='id identifier rubyid_method_id'>method_id</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_start_with?'>start_with?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>test_</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_is_a_minitest?'>is_a_minitest?</span><span class='lparen'>(</span><span class='id identifier rubyid_tp'>tp</span><span class='period'>.</span><span class='id identifier rubyid_defined_class'>defined_class</span><span class='rparen'>)</span>
|
@@ -3082,7 +3191,6 @@
|
|
3082
3191
|
<pre class="lines">
|
3083
3192
|
|
3084
3193
|
|
3085
|
-
345
|
3086
3194
|
346
|
3087
3195
|
347
|
3088
3196
|
348
|
@@ -3118,17 +3226,18 @@
|
|
3118
3226
|
378
|
3119
3227
|
379
|
3120
3228
|
380
|
3121
|
-
381
|
3229
|
+
381
|
3230
|
+
382</pre>
|
3122
3231
|
</td>
|
3123
3232
|
<td>
|
3124
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
3233
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 346</span>
|
3125
3234
|
|
3126
3235
|
<span class='kw'>def</span> <span class='id identifier rubyid_start_rspec_binding_capture'>start_rspec_binding_capture</span>
|
3236
|
+
<span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_capture_limit_exceeded?'>capture_limit_exceeded?</span>
|
3127
3237
|
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
3128
3238
|
<span class='ivar'>@rspec_example_binding</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
3129
3239
|
<span class='ivar'>@capture_next_binding</span> <span class='op'>=</span> <span class='kw'>false</span>
|
3130
3240
|
<span class='ivar'>@rspec_tracepoint</span><span class='op'>&.</span><span class='id identifier rubyid_disable'>disable</span>
|
3131
|
-
<span class='ivar'>@enabled</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='ivar'>@enabled</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
3132
3241
|
|
3133
3242
|
<span class='ivar'>@rspec_tracepoint</span> <span class='op'>=</span> <span class='const'>TracePoint</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:raise</span><span class='comma'>,</span> <span class='symbol'>:b_return</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_tp'>tp</span><span class='op'>|</span>
|
3134
3243
|
<span class='comment'># puts "name #{tp.raised_exception.class.name rescue ''} method:#{tp.method_id} tp.binding:#{tp.binding.local_variables rescue ''}"
|
@@ -3186,12 +3295,14 @@
|
|
3186
3295
|
327
|
3187
3296
|
328
|
3188
3297
|
329
|
3189
|
-
330
|
3298
|
+
330
|
3299
|
+
331</pre>
|
3190
3300
|
</td>
|
3191
3301
|
<td>
|
3192
3302
|
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 324</span>
|
3193
3303
|
|
3194
3304
|
<span class='kw'>def</span> <span class='id identifier rubyid_stop_minitest_binding_capture'>stop_minitest_binding_capture</span>
|
3305
|
+
<span class='id identifier rubyid_disable_capturing!'>disable_capturing!</span> <span class='kw'>if</span> <span class='id identifier rubyid_capture_limit_exceeded?'>capture_limit_exceeded?</span>
|
3195
3306
|
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
3196
3307
|
<span class='ivar'>@minitest_trace</span><span class='op'>&.</span><span class='id identifier rubyid_disable'>disable</span>
|
3197
3308
|
<span class='ivar'>@minitest_trace</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
@@ -3218,7 +3329,6 @@
|
|
3218
3329
|
<pre class="lines">
|
3219
3330
|
|
3220
3331
|
|
3221
|
-
383
|
3222
3332
|
384
|
3223
3333
|
385
|
3224
3334
|
386
|
@@ -3227,12 +3337,15 @@
|
|
3227
3337
|
389
|
3228
3338
|
390
|
3229
3339
|
391
|
3230
|
-
392
|
3340
|
+
392
|
3341
|
+
393
|
3342
|
+
394</pre>
|
3231
3343
|
</td>
|
3232
3344
|
<td>
|
3233
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
3345
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 384</span>
|
3234
3346
|
|
3235
3347
|
<span class='kw'>def</span> <span class='id identifier rubyid_stop_rspec_binding_capture'>stop_rspec_binding_capture</span>
|
3348
|
+
<span class='id identifier rubyid_disable_capturing!'>disable_capturing!</span> <span class='kw'>if</span> <span class='id identifier rubyid_capture_limit_exceeded?'>capture_limit_exceeded?</span>
|
3236
3349
|
<span class='id identifier rubyid_mutex'>mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
3237
3350
|
<span class='ivar'>@rspec_tracepoint</span><span class='op'>&.</span><span class='id identifier rubyid_disable'>disable</span>
|
3238
3351
|
<span class='ivar'>@rspec_tracepoint</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
@@ -3262,15 +3375,15 @@
|
|
3262
3375
|
<pre class="lines">
|
3263
3376
|
|
3264
3377
|
|
3265
|
-
552
|
3266
|
-
553
|
3267
3378
|
554
|
3268
3379
|
555
|
3269
3380
|
556
|
3270
|
-
557
|
3381
|
+
557
|
3382
|
+
558
|
3383
|
+
559</pre>
|
3271
3384
|
</td>
|
3272
3385
|
<td>
|
3273
|
-
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line
|
3386
|
+
<pre class="code"><span class="info file"># File 'lib/enhanced_errors.rb', line 554</span>
|
3274
3387
|
|
3275
3388
|
<span class='kw'>def</span> <span class='id identifier rubyid_validate_binding_format'>validate_binding_format</span><span class='lparen'>(</span><span class='id identifier rubyid_binding_info'>binding_info</span><span class='rparen'>)</span>
|
3276
3389
|
<span class='kw'>unless</span> <span class='id identifier rubyid_binding_info'>binding_info</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='symbol'>:capture_event</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_binding_info'>binding_info</span><span class='lbracket'>[</span><span class='symbol'>:variables</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
|
@@ -3288,9 +3401,9 @@
|
|
3288
3401
|
</div>
|
3289
3402
|
|
3290
3403
|
<div id="footer">
|
3291
|
-
Generated on
|
3404
|
+
Generated on Mon Dec 16 10:41:42 2024 by
|
3292
3405
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
3293
|
-
0.9.37 (ruby-3.
|
3406
|
+
0.9.37 (ruby-3.3.6).
|
3294
3407
|
</div>
|
3295
3408
|
|
3296
3409
|
</div>
|