Benign gem 466,252 installs Download

redgreen 1.2.2

“redgreen is an expanded version of Pat Eyler's RedGreen. It will install a 'rg' file in your bin directory. Use that as you would use 'ru…”

Large registry install base (10k+ downloads)Ruby dynamically invokes a method with send
SHA-25671df36fcc2f02afa30b419f7a2cb10fac4925121d679090a6e9a1eeae489cba9
MaleculeH₂(Db₂F)

Evidence

Ruby send syntax targets define_method autotest.rb · lines 1–13
1Autotest.send(:alias_method, :real_ruby, :ruby)
2Autotest.send(:define_method, :ruby) do |*args|
3 real_ruby + %[ -rrubygems -e "require 'redgreen'" ]
4end
5
6if PLATFORM =~ /win32/
7 require 'win32console'
8 Autotest.send(:define_method, :run_tests) do |*args|
9 find_files_to_test # failed + changed/affected
⋯4 lines
imports test/unit/ui/console/testrunner redgreen.rb · lines 1–7
1require 'test/unit'
2require 'test/unit/ui/console/testrunner'
3
4# cute.
5module Color
6 COLORS = { :clear => 0, :red => 31, :green => 32, :yellow => 33 }
7 de …
Source writes a file buffer redgreen.rb · lines 25–35
25:40… low("E")
26 else something
27 end
28 @io.write(something)
29 @io.flush
30 end
⋯5 lines
Ruby dynamically invokes a method with send redgreen.rb · lines 46–53
46:20… /\d+ tests, \d+ assertions, (\d+) failures, (\d+) errors/
47 Color.send($1.to_i != 0 || $2.to_i != 0 ? :red : :green, $&)
48 end
49 end
⋯4 lines

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.