lib/cutter/inspection.rb in cutter-0.5.1 vs lib/cutter/inspection.rb in cutter-0.5.2

- old
+ new

@@ -20,10 +20,10 @@ # For now inspect! method only may be used with two arguments (local_variables, binding) # Binding is a Ruby class: http://www.ruby-doc.org/core/classes/Binding.html def inspect! _binding = nil, &block return true if Cutter::Inspection.quiet? - raise "Try binding as argument or wrap method content into block!" if (!block_given?&&!_binding) + raise "Try binding as argument or wrap used it with braces like: inspect! {}" if (!block_given?&&!_binding) _binding ||= block.binding puts "method: `#{caller_method_name}'" puts %{ variables:} eval('local_variables',_binding).map do |lv| puts %{ #{lv}: #{eval(lv.to_s, _binding)} }