Skip to content

Instantly share code, notes, and snippets.

View zenspider's full-sized avatar
🌈
It's complicated?

Ryan Davis zenspider

🌈
It's complicated?
View GitHub Profile
diff -r old/lib/minitest.rb new/lib/minitest.rb
--- old/lib/minitest.rb
+++ new/lib/minitest.rb
@@ -164,11 +164,33 @@
warn "Interrupted. Exiting..."
end
self.parallel_executor.shutdown
+
+ # might have been removed/replaced during init_plugins:
+ summary = reporter.reporters.grep(SummaryReporter).first
10422 % ruby -Ilib kaboom.rb
Run options: --seed 39367
# Running:
E
Finished in 0.094671s, 10.5629 runs/s, 0.0000 assertions/s.
1) Error:

sudo nice -20

8710 % sudo nice -n -20 ./qb.rb
Calculating -------------------------------------
          caller_old     93.921k (± 0.4%) i/s -    473.433k in   5.040798s
          caller_new     95.918k (± 5.7%) i/s -    480.935k in   5.035228s
         caller_new2    104.619k (± 0.3%) i/s -    528.462k in   5.051375s
caller_locations_old    124.798k (± 0.2%) i/s -    625.185k in   5.009594s
caller_locations_new    125.252k (± 0.8%) i/s -    630.288k in   5.032480s
caller_locations_new2   140.866k (± 0.2%) i/s -    705.888k in   5.011073s
+ Output relative path:line where possible, absolute otherwise.
- BacktraceFilter#filter can now work with caller_locations.
diff -r old/lib/minitest.rb new/lib/minitest.rb
--- old/lib/minitest.rb
+++ new/lib/minitest.rb
@@ -523,12 +523,14 @@
not self.failure
end
#!/usr/bin/ruby -w
$: << "../../sexp_processor/dev/lib"
$: << "lib"
require "ruby_parser"
require "sexp_processor"
require "set"
diff -r old/lib/minitest.rb new/lib/minitest.rb
--- old/lib/minitest.rb
+++ new/lib/minitest.rb
--- /tmp/tmp.99247.0x2055f8280.49 2023-07-20 11:24:53
+++ /Users/ryan/Work/p4/zss/src/minitest/dev/lib/minitest.rb 2023-07-20 11:12:35
@@ -446,6 +446,31 @@
self.name = name
self.failures = []
self.assertions = 0
+ # lazy initializer for metadata
class CompressedSystemStackError < StandardError # NOT SystemStackError
def self.raise_from sse
raise CompressedSystemStackError, sse.message, compress(sse.backtrace)
end
##
# Compress an array of strings by finding cycles within and
# reformatting them.
# ---
# FFS this is an unreadable mess. Please forgive, I didn't want to
10040 % ./gauntlet/bin/gauntlet.rb -V gauntlet/gauntlet.2021-12-27.all.noindex/5/7
2 0 0
# gauntlet/gauntlet.2021-12-27.all.noindex/5/7/3/573192b55324d6573841d0942c0d20adbdaa69d3.rb
SRC/sexp_processor/dev/lib/sexp.rb:112:in `block in deep_each': stack level too deep (CompressedSystemStackError)
from SRC/sexp_processor/dev/lib/sexp.rb:145:in `block in each_sexp'
from SRC/sexp_processor/dev/lib/sexp.rb:142:in `each'
from +->> 828 cycles of 5 lines:
from | SRC/sexp_processor/dev/lib/sexp.rb:142:in `each_sexp'
from | SRC/sexp_processor/dev/lib/sexp.rb:111:in `deep_each'
from | SRC/sexp_processor/dev/lib/sexp.rb:113:in `block in deep_each'