Permalink
Browse files

0.0.1

  • Loading branch information...
1 parent f001da3 commit d38da95d5e6bd15d421cde9fc7afe96110bcf206 @kachick committed Apr 1, 2012
Showing with 20 additions and 14 deletions.
  1. +1 −0 Manifest.txt
  2. +4 −2 README.rdoc
  3. +3 −0 example.rb
  4. +12 −12 lib/aprilfool.rb
View
@@ -3,4 +3,5 @@ LICENSE
History.rdoc
Manifest.txt
Rakefile
+example.rb
lib/aprilfool.rb
View
@@ -1,11 +1,11 @@
= April Fool
* http://github.com/kachick/aprilfool
+* http://rubygems.org/gems/aprilfool
== Description
A joke gem.
-(Don't use in mission-critical!!)
== Usage
@@ -20,7 +20,9 @@ A joke gem.
* Ruby
target release versions
- * 1.9.3-p125
+
+ * 1.9.3-p125
+ * 1.9.2-p290
== Installation
View
@@ -0,0 +1,3 @@
+require_relative 'lib/aprilfool'
+
+p [7, '7', :'7']
View
@@ -11,20 +11,20 @@ module AprilFool
VERSION = '0.0.1'
end
-class Object
- now = Time.now
+class Time
+ def aprilfool?
+ (month == 4) && (day == 1)
+ end
+end
- if now.month == 4 and now.day == 1
- tommorow = Time.local now.year, 4, 2
-
- constants.reject{|c|/Config/ =~ c}.map{|c|const_get c}.grep Module do |mod|
- mod.instance_eval do
- define_method :inspect do
- "This Freedom day will end after #{(tommorow - now).to_i} secs. Have fun! ;)"
- end
+if Time.now.aprilfool?
+ module Kernel
+ def p(*args)
+ args.each do |arg|
+ puts "Not #{arg.inspect} ;)"
end
end
- else
- $stderr.puts 'WARN: Get back to your normal life. o_0'
end
+else
+ $stderr.puts 'WARN: Get back to your normal life. o_0'
end

0 comments on commit d38da95

Please sign in to comment.