rails/rails — pull request #11962 by gsamokovarov (2013-08-21 14:25:28+00:00)
Title: Add Kernel#{yes,on} and Kernel#{no,off}

Introduce true and false aliases in the spirit of YAML and CoffeeScript.

While it may sounds silly at first, those are actually looking pretty neat, especially in configs. For example, here is the default development config with the aliases:

```ruby
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.

# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = no

# Do not eager load code on boot.
config.eager_load = no

# Show full error reports and disable caching.
config.consider_all_requests_local = yes
config.action_controller.perform_caching = yes

# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = no

# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log

# Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load

# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = on
end
```

It's just a little bit of sugar, but it makes me smile everytime I look at it.