We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a34065 commit 4c05942Copy full SHA for 4c05942
spec/ruby/optional/capi/kernel_spec.rb
@@ -503,6 +503,11 @@ def proc_caller
503
it "evaluates a string of ruby code" do
504
@s.rb_eval_string("1+1").should == 2
505
end
506
+
507
+ it "captures local variables when called within a method" do
508
+ a = 2
509
+ @s.rb_eval_string("a+1").should == 3
510
+ end
511
512
513
describe "rb_eval_cmd_kw" do
spec/tags/optional/capi/kernel_tags.txt
@@ -1,2 +1,3 @@
1
fails:C-API Kernel function rb_block_lambda converts the implicit block into a lambda
2
slow:C-API Kernel function rb_set_end_proc runs a C function on shutdown
3
+fails:C-API Kernel function rb_eval_string captures local variables when called within a method
0 commit comments