Froze rails gems
[depot.git] / vendor / rails / activesupport / lib / active_support / core_ext / kernel / agnostics.rb
diff --git a/vendor/rails/activesupport/lib/active_support/core_ext/kernel/agnostics.rb b/vendor/rails/activesupport/lib/active_support/core_ext/kernel/agnostics.rb
new file mode 100644 (file)
index 0000000..c0cb4fb
--- /dev/null
@@ -0,0 +1,11 @@
+class Object
+  # Makes backticks behave (somewhat more) similarly on all platforms.
+  # On win32 `nonexistent_command` raises Errno::ENOENT; on Unix, the
+  # spawned shell prints a message to stderr and sets $?.  We emulate
+  # Unix on the former but not the latter.
+  def `(command) #:nodoc:
+    super
+  rescue Errno::ENOENT => e
+    STDERR.puts "#$0: #{e}"
+  end
+end
\ No newline at end of file