Package org.jruby

Examples of org.jruby.RubyException.callMethod()


            eval("exit " + argument);
            fail("Expected a SystemExit to be thrown by calling exit.");
        } catch (RaiseException re) {
          RubyException raisedException = re.getException();
          if (runtime.getClass("SystemExit").isInstance(raisedException)) {
              IRubyObject status = raisedException.callMethod(runtime.getCurrentContext(), "status");
              assertEquals(expectedStatus, status);
          } else {
            throw re;
          }
        }
View Full Code Here


            eval("exit " + argument);
            fail("Expected a SystemExit to be thrown by calling exit.");
        } catch (RaiseException re) {
          RubyException raisedException = re.getException();
          if (runtime.getClass("SystemExit").isInstance(raisedException)) {
              IRubyObject status = raisedException.callMethod(runtime.getCurrentContext(), "status");
              assertEquals(expectedStatus, status);
          } else {
            throw re;
          }
        }
View Full Code Here

            eval("exit " + argument);
            fail("Expected a SystemExit to be thrown by calling exit.");
        } catch (RaiseException re) {
          RubyException raisedException = re.getException();
          if (runtime.getClass("SystemExit").isInstance(raisedException)) {
              IRubyObject status = raisedException.callMethod(runtime.getCurrentContext(), "status");
              assertEquals(expectedStatus, status);
          } else {
            throw re;
          }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.