Permalink
Browse files

Ruby object mixins must now be explicitly loaded via "require 'gibble…

…r/mixins'"
  • Loading branch information...
1 parent 586a902 commit 7a72485c2aea84abb175d7565b7768b4b262eec8 @delano committed Apr 20, 2012
Showing with 47 additions and 40 deletions.
  1. +5 −0 CHANGES.txt
  2. +9 −32 lib/gibbler.rb
  3. +1 −1 lib/gibbler/aliases.rb
  4. +32 −7 lib/gibbler/mixins.rb
  5. 0 try/{01_mixins_try.rb → 01_core_ext_try.rb}
View
@@ -1,5 +1,10 @@
GIBBLER, CHANGES
+#### 0.9.0 (2012-04-20) ###############################
+
+* CHANGE: Ruby object mixins must now be explicitly loaded via "require 'gibbler/mixins'"
+* CHANGE: Removed Gibbler.enable_debug/disable_debug
+
#### 0.8.9 (2011-02-11) ###############################
* FIXED: Remove debug output.
View
@@ -33,8 +33,6 @@ class << self
attr_accessor :secret, :default_base
end
- require 'gibbler/mixins'
-
class Error < RuntimeError
def initialize(obj); @obj = obj; end
end
@@ -218,7 +216,7 @@ def freeze()
module Gibbler
- @@gibbler_debug = false
+ @@gibbler_debug = true
@@gibbler_digest_type = ::Digest::SHA1
# Specify a different digest class. The default is +Digest::SHA1+. You
@@ -230,9 +228,7 @@ def self.digest_type=(v)
@@gibbler_digest_type = v
end
# Returns the current debug status (true or false)
- def self.debug?; @@gibbler_debug; end
- def self.enable_debug; @@gibbler_debug = true; end
- def self.disable_debug; @@gibbler_debug = false; end
+ def self.debug?; @@gibbler_debug; end
def self.debug=(v); @@gibbler_debug = v; end
# Returns the current digest class.
def self.digest_type; @@gibbler_digest_type; end
@@ -644,34 +640,15 @@ def __gibbler(digest_type=nil)
end
+class String
+ unless method_defined? :clear
+ def clear
+ replace ""
+ end
+ end
+end
-class NilClass; include Gibbler::Nil; end
-class Class; include Gibbler::Object; end
-class Module; include Gibbler::Object; end
-class Proc; include Gibbler::Object; end
-class String; include Gibbler::String; end
-class Regexp; include Gibbler::String; end
-class Fixnum; include Gibbler::String; end
-class Bignum; include Gibbler::String; end
-class TrueClass; include Gibbler::String; end
-class FalseClass; include Gibbler::String; end
-class Float; include Gibbler::String; end
-class Symbol; include Gibbler::String; end
-class Date; include Gibbler::String; end
-class Hash; include Gibbler::Hash; end
-class Array; include Gibbler::Array; end
-class Time; include Gibbler::Time; end
-class DateTime < Date; include Gibbler::DateTime; end
-class Range; include Gibbler::Range; end
-class File; include Gibbler::File; end
-class TempFile; include Gibbler::File; end
-
-# URI::Generic must be included towards the
-# end b/c it runs Object#freeze statically.
-module URI; class Generic; include Gibbler::String; end; end
-# Bundler calls freeze on an instance of Gem::Platform
-module Gem; class Platform; include Gibbler::Complex; end; end
@@ -1,5 +1,5 @@
-require 'gibbler'
+require 'gibbler/mixins'
module Gibbler
View
@@ -1,9 +1,34 @@
+require 'gibbler'
+class NilClass; include Gibbler::Nil; end
+class Class; include Gibbler::Object; end
+class Module; include Gibbler::Object; end
+class Proc; include Gibbler::Object; end
+class String; include Gibbler::String; end
+class Regexp; include Gibbler::String; end
+class Fixnum; include Gibbler::String; end
+class Bignum; include Gibbler::String; end
+class TrueClass; include Gibbler::String; end
+class FalseClass; include Gibbler::String; end
+class Float; include Gibbler::String; end
+class Symbol; include Gibbler::String; end
+class Date; include Gibbler::String; end
+class Hash; include Gibbler::Hash; end
+class Array; include Gibbler::Array; end
+class Time; include Gibbler::Time; end
+class DateTime < Date; include Gibbler::DateTime; end
+class Range; include Gibbler::Range; end
+class File; include Gibbler::File; end
+class TempFile; include Gibbler::File; end
+class MatchData; include Gibbler::String; end
+class OpenStruct; include Gibbler::Object; end
+
+# URI::Generic must be included towards the
+# end b/c it runs Object#freeze statically.
+module URI; class Generic; include Gibbler::String; end; end
+
+# Bundler calls freeze on an instance of Gem::Platform
+module Gem; class Platform; include Gibbler::Complex; end; end
+
+module Addressable; class URI; include Gibbler::String; end; end
-class String
- unless method_defined? :clear
- def clear
- replace ""
- end
- end
-end
File renamed without changes.

0 comments on commit 7a72485

Please sign in to comment.