while using JRuby's embed APIs in a slightly more advanced scenarios I run into several issues :
added some tests covering intended (existing and fixed) functionality. trying to understand the details of context providers (and related embed variable impls) was a bit hard to read thus did clean-up some (helped my brain to process the code).
let me know if smt needs more work, targeting jruby-1_7 - there are no (existing) API incompatibilities ...
… impls : - share the logic of obtaining a global runtime - when global runtime is used make sure we always return the correct instance config! - introduce & use LocalContext's internal getRuntime for lazy runtime initialization - support contructors for all providers without the lazy argument
correctly synchronize local context setup/teardown (on our class)!
…ngleton provider impl