summaryrefslogtreecommitdiff
path: root/spec/ruby/optional/capi/kernel_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/optional/capi/kernel_spec.rb')
-rw-r--r--spec/ruby/optional/capi/kernel_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/ruby/optional/capi/kernel_spec.rb b/spec/ruby/optional/capi/kernel_spec.rb
index 6633ee50c1..0a2362fb30 100644
--- a/spec/ruby/optional/capi/kernel_spec.rb
+++ b/spec/ruby/optional/capi/kernel_spec.rb
@@ -703,6 +703,12 @@ describe "C-API Kernel function" do
end
end
+ describe "ruby_vm_at_exit" do
+ it "runs a C function after the VM is terminated" do
+ ruby_exe("require #{kernel_path.inspect}; CApiKernelSpecs.new.ruby_vm_at_exit").should == "ruby_vm_at_exit hook ran\n"
+ end
+ end
+
describe "rb_f_sprintf" do
it "returns a string according to format and arguments" do
@s.rb_f_sprintf(["%d %f %s", 10, 2.5, "test"]).should == "10 2.500000 test"