aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/exception/exit_value_spec.rb
blob: 8bb3cf898db7bcfe9475e8bd75134b00a0a08c2c (plain)
1
2
3
4
5
6
7
8
9
10
require_relative '../../spec_helper'

describe "LocalJumpError#exit_value" do
  def get_me_a_return
    Proc.new { return 42 }
  end
  -> { get_me_a_return.call }.should raise_error(LocalJumpError) { |e|
    e.exit_value.should == 42
  }
end