lib/jsonify/blank_slate.rb in jsonify-0.0.7 vs lib/jsonify/blank_slate.rb in jsonify-0.0.8

- old
+ new

@@ -42,68 +42,6 @@ end end instance_methods.each { |m| hide(m) } end -end -###################################################################### -# Since Ruby is very dynamic, methods added to the ancestors of -# BlankSlate <em>after BlankSlate is defined</em> will show up in the -# list of available BlankSlate methods. We handle this by defining a -# hook in the Object and Kernel classes that will hide any method -# defined after BlankSlate has been loaded. -# -# module Kernel -# class << self -# alias_method :blank_slate_method_added, :method_added -# -# # Detect method additions to Kernel and remove them in the -# # BlankSlate class. -# def method_added(name) -# result = blank_slate_method_added(name) -# return result if self != Kernel -# BlankSlate.hide(name) -# result -# end -# end -# end - -###################################################################### -# Same as above, except in Object. -# -# class Object -# class << self -# alias_method :blank_slate_method_added, :method_added -# -# # Detect method additions to Object and remove them in the -# # BlankSlate class. -# def method_added(name) -# result = blank_slate_method_added(name) -# return result if self != Object -# BlankSlate.hide(name) -# result -# end -# -# def find_hidden_method(name) -# nil -# end -# end -# end - -###################################################################### -# Also, modules included into Object need to be scanned and have their -# instance methods removed from blank slate. In theory, modules -# included into Kernel would have to be removed as well, but a -# "feature" of Ruby prevents late includes into modules from being -# exposed in the first place. -# -# class Module -# alias blankslate_original_append_features append_features -# def append_features(mod) -# result = blankslate_original_append_features(mod) -# return result if mod != Object -# instance_methods.each do |name| -# BlankSlate.hide(name) -# end -# result -# end -# end +end \ No newline at end of file