<commit_before># Busted

*Pending:*
- [https://github.com/ruby/ruby/pull/462](https://github.com/ruby/ruby/pull/462)
- [http://bugs.ruby-lang.org/issues/9190](http://bugs.ruby-lang.org/issues/9190)<commit_msg>Update README; borrowed some sections from https://github.com/jch/barn/blob/master/README.md<commit_after># Busted

***Requires MRI Ruby 2.1.0dev***

Find code that busts the Ruby cache.

- Report when code invalidates Ruby's internal cache
- Uses [RubyVM.stat](https://github.com/ruby/ruby/commit/cc1063092b366a0a8449528ab6bf67a72f5ce027)

## Usage

*Any Cache*

```ruby
Busted.cache? do
  class Pizza
  end
end
#=> true
```

*Method Cache*

```ruby
Busted.method_cache? do
  def pizza
  end
end
#=> true
```

*Constant Cache*

```ruby
Busted.constant_cache? do
  PIZZA = "pizza"
end
#=> true
```

*Class Cache*

```ruby
Busted.class_cache? do
  class Beer
  end
end
#=> true
```

*No Cache Busted*

```ruby
Busted.cache? do
  beer = "beer"
end
#=> false
```

## Installation

***Requires MRI Ruby 2.1.0dev***

Add this line to your application's Gemfile:

    gem "busted"

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install busted

## Contributing

Check out [this guide](/CONTRIBUTING.md) if you'd like to contribute.

## License

This project is licensed under the [MIT License](/LICENSE.txt).

## Standing On The Shoulders Of Giants
A big *thank you* to [<NAME>](https://github.com/charliesome) and [<NAME>](https://github.com/tmm1) for helping flesh out `RubyVM.stat` and committing it to Ruby core!
{'fraction_non_alphanumeric': 0.14841218405703174, 'fraction_numerical': 0.031108230719377836, 'mean_word_length': 4.062295081967213, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3450287', 'n_tokens_mistral': 626, 'n_tokens_neox': 554, 'n_words': 152}