Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit c0315d0c9bc7330c501ae5ff732d5dcbfdf9aedb 1 parent 0c79b96
Jordan Sissel authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 examples/jruby-instrument-printstream.rb
13 examples/jruby-instrument-printstream.rb
View
@@ -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")
Please sign in to comment.
Something went wrong with that request. Please try again.