Module: WebConsole::UnsupportedPlatforms

Defined in:
lib/web_console/unsupported_platforms.rb

Overview

Detect unsupported platforms and try to help the user, if there is something they can do about it.

For example, not every JRuby mode is unsupported, we can guide the user what to do to enable support for that platform.

Class Method Summary collapse

Class Method Details

.jruby_in_non_interpreted_modeObject



9
10
11
12
13
14
15
16
# File 'lib/web_console/unsupported_platforms.rb', line 9

def jruby_in_non_interpreted_mode
  return unless RUBY_PLATFORM =~ /java/

  compile_mode     = JRuby.runtime.instance_config.compile_mode
  interpreted_mode = Java::OrgJruby::RubyInstanceConfig::CompileMode::OFF

  yield if compile_mode != interpreted_mode
end