Lightweight Ruby
This report summarizes scanner evidence for mruby/mruby, a C project with 5,624 GitHub stars. SynthScan examined 251,027 lines of code across 738 source files, recording 659 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 2.9 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 619 finding(s).
Are imports declared and package/API names verified? 22 finding(s).
Are wrappers, guards, and repeated structures necessary? 34 finding(s).
Which changes need focused human review? 659 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 659 distinct pattern matches across 10 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | build_config.rb | 1 | # The default build configuration file was moved to `build_config/default.rb`. | COMMENT |
| LOW | benchmark/bm_app_lc_fizzbuzz.rb | 1 | # | COMMENT |
| LOW | benchmark/vm_optimization_bench.rb | 1 | # VM Optimization Benchmarks for mruby | COMMENT |
| LOW | tools/gen_unicase.rb | 1 | # Generate the Unicode case mapping table from the Unicode Character Database. | COMMENT |
| LOW | tools/gen_unicase.rb | 21 | # Title case is stored as its difference from upper case, which is 181 entries | COMMENT |
| LOW | tools/unicode/ctype_data.rb | 1 | # The Unicode Character Database, as the character type table generator reads | COMMENT |
| LOW | tools/unicode/ctype_data.rb | 21 | COMMENT | |
| LOW | tools/unicode/corpus_data.rb | 1 | # Which characters a differential test has to ask about, chosen from the | COMMENT |
| LOW | tools/unicode/corpus_data.rb | 41 | # has a Unicode of its own. A release reaches mruby's pinned tables before | COMMENT |
| LOW | tools/unicode/case_data.rb | 1 | # The Unicode Character Database, as the case table generators read it. | COMMENT |
| LOW | tools/unicode/ucd.rb | 1 | # The Unicode Character Database: which release the tables are generated | COMMENT |
| LOW | tools/unicode/ucd.rb | 61 | # from. The version a file names on its first line would answer for most | COMMENT |
| LOW | mrblib/compar.rb | 1 | ## | COMMENT |
| LOW | mrblib/compar.rb | 41 | ## | COMMENT |
| LOW | mrblib/compar.rb | 61 | # false. | COMMENT |
| LOW | mrblib/compar.rb | 81 | def >= other | COMMENT |
| LOW | mrblib/string.rb | 81 | # Replace all matches of `pattern` with `replacement`. | COMMENT |
| LOW | mrblib/string.rb | 161 | # those two methods requires Regexp that is optional in mruby | COMMENT |
| LOW | mrblib/enum.rb | 1 | ## | COMMENT |
| LOW | mrblib/enum.rb | 21 | # if one block value is false. Otherwise | COMMENT |
| LOW | mrblib/enum.rb | 221 | # yield by `each`. If no block is given <=> | COMMENT |
| LOW | mrblib/enum.rb | 301 | end | COMMENT |
| LOW | mrblib/enum.rb | 361 | ## | COMMENT |
| LOW | mrblib/array.rb | 1 | ## | COMMENT |
| LOW | mrblib/array.rb | 41 | idx += 1 | COMMENT |
| LOW | mrblib/array.rb | 81 | ## | COMMENT |
| LOW | mrblib/numeric.rb | 1 | ## | COMMENT |
| LOW | mrblib/hash.rb | 1 | ## | COMMENT |
| LOW | mrblib/hash.rb | 21 | # was found. Return nil if nothing was | COMMENT |
| LOW | mrblib/hash.rb | 41 | # and pass the key and value of each element. | COMMENT |
| LOW | mrblib/hash.rb | 61 | while i < len | COMMENT |
| LOW | mrblib/hash.rb | 81 | # <em>produces:</em> | COMMENT |
| LOW | mrblib/hash.rb | 101 | # If no block is given, an enumerator is returned instead. | COMMENT |
| LOW | mrblib/hash.rb | 121 | # hsh.merge(other_hash..) -> hsh | COMMENT |
| LOW | mrblib/hash.rb | 181 | self.delete(k) | COMMENT |
| LOW | mrblib/hash.rb | 241 | COMMENT | |
| LOW | mrblib/range.rb | 1 | ## | COMMENT |
| LOW | mrblib/kernel.rb | 1 | ## | COMMENT |
| LOW | test/assert.rb | 261 | # Matches any string. | COMMENT |
| LOW | test/t/localjumperror.rb | 1 | ## | COMMENT |
| LOW | test/t/module.rb | 941 | # module M | COMMENT |
| LOW | test/t/module.rb | 961 | # assert_true a.respond_to?(:foo), bug8005 | COMMENT |
| LOW | test/t/module.rb | 981 | # assert 'Module#prepend super in alias' do | COMMENT |
| LOW | test/t/module.rb | 1021 | COMMENT | |
| LOW | test/t/integer.rb | 101 | COMMENT | |
| LOW | test/t/integer.rb | 201 | assert_equal(-1, imax <=> fmax) | COMMENT |
| LOW | test/t/regexperror.rb | 1 | ## | COMMENT |
| LOW | test/t/float.rb | 121 | COMMENT | |
| LOW | test/t/float.rb | 161 | assert('a Float is the object that holds what it holds') do | COMMENT |
| LOW | test/t/env.rb | 1 | # The shape of a closed env's heap stack (mruby/internal.h). | COMMENT |
| LOW | test/t/gc.rb | 121 | # that allocates bytes without allocating objects therefore has to advance the | COMMENT |
| LOW | test/t/gc.rb | 181 | assert_true (GC.generational_mode = true) | COMMENT |
| LOW | test/t/gc.rb | 201 | # | COMMENT |
| LOW | test/t/lang.rb | 1 | # The aim of these tests is to detect pitfall for optimized VM. | COMMENT |
| LOW | include/mruby.h | 41 | #endif | COMMENT |
| LOW | include/mruby.h | 61 | #define SIZE_MAX __SIZE_MAX__ | COMMENT |
| LOW | include/mruby.h | 81 | #if (defined __cplusplus && __cplusplus >= 201703L) | COMMENT |
| LOW | include/mruby.h | 121 | #define mrb_static_assert_powerof2(num) mrb_static_assert((num) > 0 && (num) == ((num) & -(num)), "need power of 2 for " | COMMENT |
| LOW | include/mruby.h | 1681 | #define ISUPPER(c) (((unsigned)(c) - 'A') < 26) | COMMENT |
| LOW | include/mruby.h | 1721 | #define E_RANGE_ERROR mrb_exc_get_id(mrb, MRB_ERROR_SYM(RangeError)) | COMMENT |
| 521 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | benchmark/vm_optimization_bench.rb | 35 | #============================================================================= | COMMENT |
| MEDIUM | benchmark/vm_optimization_bench.rb | 38 | #============================================================================= | COMMENT |
| MEDIUM | benchmark/vm_optimization_bench.rb | 61 | #============================================================================= | COMMENT |
| MEDIUM | benchmark/vm_optimization_bench.rb | 64 | #============================================================================= | COMMENT |
| MEDIUM | benchmark/vm_optimization_bench.rb | 125 | #============================================================================= | COMMENT |
| MEDIUM | benchmark/vm_optimization_bench.rb | 128 | #============================================================================= | COMMENT |
| MEDIUM | benchmark/vm_optimization_bench.rb | 207 | #============================================================================= | COMMENT |
| MEDIUM | benchmark/vm_optimization_bench.rb | 210 | #============================================================================= | COMMENT |
| MEDIUM | benchmark/vm_optimization_bench.rb | 264 | #============================================================================= | COMMENT |
| MEDIUM | benchmark/vm_optimization_bench.rb | 267 | #============================================================================= | COMMENT |
| MEDIUM | benchmark/vm_optimization_bench.rb | 314 | #============================================================================= | COMMENT |
| MEDIUM | benchmark/vm_optimization_bench.rb | 317 | #============================================================================= | COMMENT |
| MEDIUM | benchmark/vm_optimization_bench.rb | 373 | #============================================================================= | COMMENT |
| MEDIUM | benchmark/vm_optimization_bench.rb | 376 | #============================================================================= | COMMENT |
| MEDIUM | benchmark/vm_optimization_bench.rb | 424 | #============================================================================= | COMMENT |
| MEDIUM | benchmark/vm_optimization_bench.rb | 427 | #============================================================================= | COMMENT |
| MEDIUM | benchmark/vm_optimization_bench.rb | 457 | #============================================================================= | COMMENT |
| MEDIUM | benchmark/vm_optimization_bench.rb | 459 | #============================================================================= | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | test/assert.rb | 55 | # Create the assertion in a readable way | COMMENT |
| MEDIUM | mrbgems/mruby-struct/mrblib/struct.rb | 53 | # Create a hash from member names and struct values. If a block is | COMMENT |
| MEDIUM⚡ | mrbgems/mruby-struct/src/struct.c | 292 | * # Create a structure with a name in Struct | COMMENT |
| MEDIUM⚡ | mrbgems/mruby-struct/src/struct.c | 296 | * # Create a structure named by its constant | COMMENT |
| MEDIUM⚡ | mrbgems/mruby-struct/src/struct.c | 300 | * # Create a structure with keyword initialization | COMMENT |
| MEDIUM | mrbgems/mruby-task/examples/statistics.rb | 29 | # Create a monitor task | COMMENT |
| MEDIUM | mrbgems/mruby-task/examples/simple.rb | 7 | # Create a simple task | COMMENT |
| MEDIUM | mrbgems/mruby-task/examples/suspend_resume.rb | 9 | # Create a worker task | COMMENT |
| MEDIUM | mrbgems/mruby-task/examples/suspend_resume.rb | 19 | # Create a controller task | COMMENT |
| MEDIUM | mrbgems/mruby-task/examples/inspection.rb | 29 | # Create an observer task | COMMENT |
| MEDIUM | mrbgems/mruby-data/mrblib/data.rb | 15 | # Create a hash from member names and values. If a block is given, it | COMMENT |
| MEDIUM | mrbgems/mruby-data/src/data.c | 315 | * # Create a structure named by its constant | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | mrbgems/mruby-struct/src/struct.c | 302 | * User.new(id: 1, email: "user@example.com") | COMMENT |
| LOW⚡ | mrbgems/mruby-struct/src/struct.c | 303 | * #=> #<struct User id=1, email="user@example.com"> | COMMENT |
| LOW | mrbgems/mruby-struct/src/struct.c | 690 | * jane = Customer.new("Jane Doe", "456 Elm, Anytown NC", 12345) | COMMENT |
| LOW⚡ | mrbgems/mruby-data/README.md | 32 | customer1 = Customer.new("John Doe", "123 Main St", 12345) | CODE |
| LOW⚡ | mrbgems/mruby-data/README.md | 32 | customer1 = Customer.new("John Doe", "123 Main St", 12345) | CODE |
| LOW⚡ | mrbgems/mruby-data/README.md | 38 | customer2 = Customer.new(name: "Jane Doe", address: "456 Oak Ave", zip: 67890) | CODE |
| LOW | mrbgems/mruby-data/README.md | 49 | puts customer1.name # Output: "John Doe" | CODE |
| LOW⚡ | mrbgems/mruby-data/README.md | 78 | # Output: {:name=>"John Doe", :address=>"123 Main St", :zip=>12345} | COMMENT |
| LOW⚡ | mrbgems/mruby-data/README.md | 78 | # Output: {:name=>"John Doe", :address=>"123 Main St", :zip=>12345} | COMMENT |
| LOW⚡ | mrbgems/mruby-data/README.md | 85 | # Output: ["John Doe", "123 Main St", 12345] | COMMENT |
| LOW⚡ | mrbgems/mruby-data/README.md | 85 | # Output: ["John Doe", "123 Main St", 12345] | COMMENT |
| LOW⚡ | mrbgems/mruby-data/README.md | 92 | # Output: {name: "John Doe"} | COMMENT |
| LOW⚡ | mrbgems/mruby-data/README.md | 96 | p name # Output: "John Doe" | CODE |
| LOW⚡ | mrbgems/mruby-data/README.md | 111 | puts customer1 # Output: #<data Customer name="John Doe", address="123 Main St", zip=12345> | CODE |
| LOW⚡ | mrbgems/mruby-data/README.md | 111 | puts customer1 # Output: #<data Customer name="John Doe", address="123 Main St", zip=12345> | CODE |
| LOW⚡ | mrbgems/mruby-data/README.md | 112 | p customer1 # Output: #<data Customer name="John Doe", address="123 Main St", zip=12345> | CODE |
| LOW⚡ | mrbgems/mruby-data/README.md | 112 | p customer1 # Output: #<data Customer name="John Doe", address="123 Main St", zip=12345> | CODE |
| LOW | mrbgems/mruby-data/src/data.c | 220 | * Customer.new("Joe", "123 Main St", 12345) | COMMENT |
| LOW | mrbgems/mruby-data/src/data.c | 221 | * Customer.new(name: "Joe", address: "123 Main St", zip: 12345) | COMMENT |
| LOW | mrbgems/mruby-data/src/data.c | 398 | * customer = Customer.new("Joe", "123 Main St", 12345) | COMMENT |
| LOW | mrbgems/mruby-data/src/data.c | 430 | * jane = Customer.new("Jane Doe", "456 Elm, Anytown NC", 12345) | COMMENT |
| LOW | doc/guides/mrbgems.md | 281 | spec.author = 'John Doe' | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | test/assert.rb | 339 | def assert_raise_with_message(*args, &block) | CODE |
| LOW⚡ | test/assert.rb | 342 | def assert_raise_with_message_pattern(*args, &block) | CODE |
| LOW⚡ | test/assert.rb | 345 | def _assert_raise_with_message(type, exc, exp_msg, msg = nil, &block) | CODE |
| LOW | test/t/module.rb | 24 | def assert_uninitialized_const(&block) | CODE |
| LOW | test/t/syntax.rb | 2399 | def defined_anonymous_forwarding(*, **, &) | CODE |
| LOW | mrbgems/mruby-regexp/test/backref_scope.rb | 109 | def backref_scope_fiber_carried(pr) | CODE |
| LOW | mrbgems/mruby-regexp/test/backref_scope.rb | 642 | def backref_scope_suspended_slot_writer(md) | CODE |
| LOW | mrbgems/mruby-regexp/test/backref_scope.rb | 646 | def backref_scope_fiber_write_window(md) | CODE |
| LOW | mrbgems/mruby-io/test/file.rb | 6 | def assert_dirname_with_level(path, results) | CODE |
| LOW | mrbgems/mruby-array-ext/test/array.rb | 4 | def assert_permutation_combination(exp, receiver, meth, *args) | CODE |
| LOW | mrbgems/mruby-array-ext/test/array.rb | 21 | def assert_repeated_permutation(exp, receiver, *args) | CODE |
| LOW | mrbgems/mruby-array-ext/test/array.rb | 25 | def assert_repeated_combination(exp, receiver, *args) | CODE |
| LOW | lib/mruby/amalgam.rb | 678 | def write_static_rename_cleanup(f, collisions) | CODE |
| LOW | lib/mruby/amalgam.rb | 836 | def opcode_macro_reconciliation(header) | CODE |
| LOW | lib/mruby/amalgam.rb | 850 | def transform_source_includes(content, source_dir = nil) | CODE |
| LOW | lib/mruby/build.rb | 861 | def define_installer_if_needed(bin) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mrbgems/mruby-pack/test/pack.rb | 93 | # Check if last two characters are backtick and newline | COMMENT |
| LOW | scripts/check_makefiles_for_tabs.sh | 5 | # Check if the file exists and is a regular file | COMMENT |
| LOW | lib/mruby/amalgam.rb | 952 | # Check if header was already processed | COMMENT |
| LOW | lib/mruby/amalgam.rb | 963 | # Check if this is an mruby header that should be inlined/transformed | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | doc/guides/rom-method-table.md | 75 | ### Step 1: Define the Static Data | COMMENT |
| LOW | doc/guides/rom-method-table.md | 90 | ### Step 2: Register in the Init Function | COMMENT |
| LOW | doc/guides/rom-method-table.md | 107 | ### Step 3: Verify | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mrbgems/mruby-proc-ext/mrblib/proc.rb | 46 | # Instances of class Proc simply return themselves. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | build_config/cosmopolitan.rb | 15 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/gc.c | 705 | arguments. Don't forget to remove the object using | CODE |