Permalink
Browse files

- Hack for not wrapping Exception, not sure if this will stay.

  • Loading branch information...
1 parent 0c79b96 commit c0315d0c9bc7330c501ae5ff732d5dcbfdf9aedb @jordansissel committed Nov 19, 2010
Showing with 13 additions and 0 deletions.
  1. +13 −0 examples/jruby-instrument-printstream.rb
View
13 examples/jruby-instrument-printstream.rb
@@ -0,0 +1,13 @@
+require "rubygems"
+require "java"
+require "minstrel"
+
+m = Minstrel::Instrument.new
+
+# Wrap java.io.PrintStream
+m.wrap(java.io.PrintStream) do |point, klass, method, *args|
+ puts "#{point} #{klass.name || klassname}##{method}(#{args.inspect})"
+end
+
+# Try it.
+java.lang.System.out.println("Testing")

0 comments on commit c0315d0

Please sign in to comment.