script/conflicts in facets-2.4.0 vs script/conflicts in facets-2.4.1
- old
+ new
@@ -1,13 +1,30 @@
#!/usr/bin/env ruby
+require 'enumerator'
+
$: << 'lib'
+#$: << 'lib'
-require 'enumerator'
+libs = ARGV #(ENV['LIBS'] || "").split(/[;:]/)
-# Return a hash for each defined class containing a array of two arrays,
-# the first containing the class methods and the second the instance methods
+# We add time b/c both that's built-in but not loaded by Ruby.
+original = `script/methods time.rb yaml.rb`.split(/\s/)
+facets = `script/methods lib/facets`.split(/\s/)
+other = `script/methods #{libs.join(' ')}`.split(/\s/)
+
+facets = facets - original
+other = other - original
+clash = facets & other
+
+puts clash.sort.join("\n")
+puts " #{clash.size} Clashes"
+
+
+=begin
+
+# Return a hash for each defined class containing a array class and method.
def methods_by_class
Module.
constants.
map{|klass| eval(klass)}.
select{|klass| klass.is_a? Class}.
@@ -24,15 +41,23 @@
ARGV.each{|a| require a }
after = methods_by_class
+delta = after - before
+
+puts delta.join("\n")
+
+exit
+
# Print the difference between the before and after method lists:
before.keys.sort_by{|k| k.to_s}.each{|k|
class_diff = after[k][0]-before[k][0]
instance_diff = after[k][1]-before[k][1]
next if class_diff.empty? && instance_diff.empty?
puts((class_diff.sort.map{|c| "#{k}."+c} +
instance_diff.sort.map{|c| "#{k}#"+c}
)*"\n")
}
+
+=end