0.0
No commit activity in last 3 years
No release in over 3 years
When you're ready to live in more of an uncertain world. Just require this module, and when you observe true or false values then their values might change.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.3
>= 0
 Project Readme

Acme::Heisenberg

When you're ready to live in more of an uncertain world. Just require this module, and when you observe true or false values then their values might change.

Installation

Install it with:

$ gem install acme-heisenberg

Usage

[1] pry(main)> require 'acme/heisenberg'
=> false
[2] pry(main)> 1==1
=> false
[3] pry(main)> 1==1
=> false
[4] pry(main)> 1==1
=> false
[5] pry(main)> 1==1
=> true
[6] pry(main)> 1==1
=> false
[7] pry(main)> 1==1
=> true
[8] pry(main)> 

Perhaps the most surprising is that only the observation of the boolean is affected:

[9] pry(main)> b = 1==1; puts "Outputs: #{b}" if b
Outputs: false
=> nil
[10] pry(main)> b = 1==1; puts "Outputs: #{b}" if b
Outputs: true
=> nil

So the boolean still operates as if it's true, even though when you look at it it can be either true or false. Holy Schrödinger's Cat!

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request