We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 853ac9b commit 6813a10Copy full SHA for 6813a10
lib/iruby/display.rb
@@ -284,7 +284,7 @@ def format(mime = nil, &block)
284
obj.to_iruby
285
end
286
287
- match {|obj| obj.respond_to?(:path) && File.readable?(obj.path) }
+ match {|obj| obj.respond_to?(:path) && obj.method(:path).arity == 0 && File.readable?(obj.path) }
288
format do |obj|
289
mime = MimeMagic.by_path(obj.path).to_s
290
[mime, File.read(obj.path)] if SUPPORTED_MIMES.include?(mime)
0 commit comments