Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7f6e378d784b
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0d1449bde2ec
Choose a head ref
  • 5 commits
  • 96 files changed
  • 1 contributor

Commits on May 14, 2017

  1. Squashed 'spec/mspec/' changes from 8604276..4398eef

    4398eef Add a YAML file containing the last spec update from each repo
    f68b1ad sync-rubyspec: Allow to pass LAST_MERGE manually
    c09701c sync-rubyspec: refactor implementations in a class
    dcfe729 sync-rubyspec: verify commits and merge to master
    cc8a0b8 Automatically rebase and run tests in sync-rubyspec
    f7ed6ab Add initial version of the sync-rubyspec script
    12646ef Add a suppress_warning helper
    
    git-subtree-dir: spec/mspec
    git-subtree-split: 4398eefbf517ab2caf59ff13e6017a444aff5190
    eregon committed May 14, 2017
    Copy the full SHA
    88e989c View commit details
  2. Copy the full SHA
    8360155 View commit details
  3. Squashed 'spec/ruby/' changes from 0db663b..032022c

    032022c Fixed Fiber.yield not propagating rescued exception.
    83f18ad Refactor expectations to use the block of the raise_error matcher
    d971f0e suppress warning
    e8495f9 The exception raised when exec/spawn unexecutable file on Windows is various
    c90f00f remove wrong expectation
    1dfd209 `notepad.exe` does not always exist in `C:\Windows`
    3e085cd Windows does not know Unix style timezone
    1a416a2 On LLP64 platform (mswin64), the return value of String#hash is fixnum.
    a500503 Skip specs which make non-socket fd nonblocking on Windows
    bec2d36 Support bulding the extension on Windows
    114703a unistd.h is only available when HAVE_UNISTD_H is 1
    81c6683 Skip the spec which uses `fork` on Windows
    9824a40 The title of "Desktop" may be localized
    c24c184 Skip on Windows because it always fails
    3df6000 remove code old versions
    1c5bffa Support building exts of spec on mswin
    4f7abf0 Use environment values to find ruby and flags instead of an argument
    587c8bd Use ruby_cmd instead of the RUBY_EXE constant in specs
    336f7d9 Use the Mutex to know whether we entered the signal handler in Process#kill specs
    d46e74f Process.getpgrp and Process.setsid must be available for Process#kill group specs
    a1bf820 Use #system directly with multiple arguments in Process#kill specs
    8974c7f Update specs to follow newlines added by r58596
    b3ab721 * remove trailing spaces, append newline at EOF.
    d3ffd45 Guard -S specs on Windows
    2b0abda Fix UNIXServer#accept spec to use path of the before block
    0f66fb9 Check that the class var is defined before removing it
    b9c89cd Fix defined? specs with the same description
    493b062 Check with max length of path 107 for unix sockets
    4c7c6fb Use a shorter pathname for unix socket specs
    1997185 Fix Time#- to only require the precision their specdoc implies
    43f0faf Add few tests for -x and -S options
    a753318 Look for different types of files only when running related specs
    4cbe34d Run guard code inside example in IO#advise spec
    6938b80 Fix spec with duplicated specdoc
    c6d1def Add specs for global and special variable access
    0f31865 Add specs for negative cases of Fixnum#&
    7244054 Fix a few duplicated spec descriptions
    8c86482 Fix specs with duplicated descriptions in language
    2ad9b8e Use mspec's mkdir_p instead of FileUtils
    9dbecca Remove dead code
    562cc9a Integer.round always returns an integer since 2.5
    41176ea Remove check for unicode_normalize to be required from v2.5 (second try)
    7214c65 Restore "Avoid using #fork in Process#wait specs"
    51bc2c1 Continuation specs were removed so remove the corresponding mspec feature
    
    git-subtree-dir: spec/ruby
    git-subtree-split: 032022ca8845a2a1eb55df2bd0d387e48deea3b7
    eregon committed May 14, 2017
    Copy the full SHA
    6c83462 View commit details
  4. Copy the full SHA
    b89bb6d View commit details
  5. Add tags for new specs

    eregon committed May 14, 2017
    Copy the full SHA
    0d1449b View commit details
Showing with 685 additions and 310 deletions.
  1. +1 −0 spec/mspec/lib/mspec/helpers.rb
  2. +9 −0 spec/mspec/lib/mspec/helpers/warning.rb
  3. +19 −0 spec/mspec/spec/helpers/suppress_warning_spec.rb
  4. +4 −0 spec/mspec/tool/sync/.gitignore
  5. +210 −0 spec/mspec/tool/sync/sync-rubyspec.rb
  6. +4 −0 spec/mspec/tool/sync/sync.yml
  7. +19 −0 spec/ruby/command_line/dash_upper_s_spec.rb
  8. +13 −4 spec/ruby/command_line/dash_x_spec.rb
  9. +1 −1 spec/ruby/command_line/fixtures/bad_syntax.rb
  10. +3 −0 spec/ruby/command_line/fixtures/bin/bad_embedded_ruby.txt
  11. 0 spec/ruby/command_line/fixtures/{ → bin}/embedded_ruby.txt
  12. +4 −0 spec/ruby/command_line/fixtures/bin/hybrid_launcher.sh
  13. +2 −0 spec/ruby/command_line/fixtures/bin/launcher.rb
  14. +2 −2 spec/ruby/core/bignum/bit_and_spec.rb
  15. +10 −0 spec/ruby/core/binding/eval_spec.rb
  16. +8 −0 spec/ruby/core/binding/fixtures/classes.rb
  17. +11 −0 spec/ruby/core/binding/local_variable_get_spec.rb
  18. +12 −0 spec/ruby/core/binding/local_variable_set_spec.rb
  19. +21 −7 spec/ruby/core/binding/shared/clone.rb
  20. +1 −1 spec/ruby/core/complex/negative_spec.rb
  21. +1 −1 spec/ruby/core/complex/positive_spec.rb
  22. +15 −0 spec/ruby/core/fiber/yield_spec.rb
  23. +1 −0 spec/ruby/core/file/fixtures/do_not_remove
  24. +13 −14 spec/ruby/core/file/fixtures/file_types.rb
  25. +5 −1 spec/ruby/core/file/ftype_spec.rb
  26. +5 −2 spec/ruby/core/file/stat/ftype_spec.rb
  27. +15 −0 spec/ruby/core/fixnum/bit_and_spec.rb
  28. +13 −3 spec/ruby/core/integer/round_spec.rb
  29. +11 −10 spec/ruby/core/io/advise_spec.rb
  30. +12 −14 spec/ruby/core/io/popen_spec.rb
  31. +5 −5 spec/ruby/core/kernel/fixtures/classes.rb
  32. +0 −1 spec/ruby/core/kernel/itself_spec.rb
  33. +15 −1 spec/ruby/core/kernel/shared/require.rb
  34. +1 −0 spec/ruby/core/module/fixtures/path2/load_path.rb
  35. +4 −2 spec/ruby/core/process/exec_spec.rb
  36. +0 −1 spec/ruby/core/process/fixtures/common.rb
  37. +9 −13 spec/ruby/core/process/fixtures/kill.rb
  38. +4 −2 spec/ruby/core/process/spawn_spec.rb
  39. +9 −7 spec/ruby/core/process/status/pid_spec.rb
  40. +7 −7 spec/ruby/core/process/wait_spec.rb
  41. +1 −1 spec/ruby/core/string/encode_spec.rb
  42. +3 −3 spec/ruby/core/time/minus_spec.rb
  43. +0 −1 spec/ruby/default.mspec
  44. +2 −2 spec/ruby/language/block_spec.rb
  45. +11 −9 spec/ruby/language/defined_spec.rb
  46. +1 −1 spec/ruby/language/fixtures/super.rb
  47. +2 −2 spec/ruby/language/heredoc_spec.rb
  48. +0 −7 spec/ruby/language/regexp/character_classes_spec.rb
  49. +1 −1 spec/ruby/language/regexp_spec.rb
  50. +4 −4 spec/ruby/language/rescue_spec.rb
  51. +1 −1 spec/ruby/language/super_spec.rb
  52. +1 −1 spec/ruby/language/undef_spec.rb
  53. +20 −36 spec/ruby/language/variables_spec.rb
  54. +2 −2 spec/ruby/language/while_spec.rb
  55. +1 −1 spec/ruby/library/base64/urlsafe_decode64_spec.rb
  56. +1 −1 spec/ruby/library/net/ftp/fixtures/putbinaryfile
  57. +1 −1 spec/ruby/library/net/ftp/fixtures/puttextfile
  58. +1 −1 spec/ruby/library/net/ftp/shared/putbinaryfile.rb
  59. +1 −1 spec/ruby/library/net/ftp/shared/puttextfile.rb
  60. +1 −1 spec/ruby/library/net/ftp/storbinary_spec.rb
  61. +12 −1 spec/ruby/library/socket/fixtures/classes.rb
  62. +1 −1 spec/ruby/library/socket/tcpsocket/setsockopt_spec.rb
  63. +1 −3 spec/ruby/library/socket/unixserver/accept_nonblock_spec.rb
  64. +3 −4 spec/ruby/library/socket/unixserver/accept_spec.rb
  65. +2 −2 spec/ruby/library/socket/unixserver/for_fd_spec.rb
  66. +2 −3 spec/ruby/library/socket/unixserver/open_spec.rb
  67. +2 −3 spec/ruby/library/socket/unixserver/shared/new.rb
  68. +1 −3 spec/ruby/library/socket/unixsocket/addr_spec.rb
  69. +1 −1 spec/ruby/library/socket/unixsocket/open_spec.rb
  70. +1 −2 spec/ruby/library/socket/unixsocket/partially_closable_spec.rb
  71. +1 −3 spec/ruby/library/socket/unixsocket/path_spec.rb
  72. +1 −3 spec/ruby/library/socket/unixsocket/peeraddr_spec.rb
  73. +1 −1 spec/ruby/library/socket/unixsocket/recv_io_spec.rb
  74. +1 −3 spec/ruby/library/socket/unixsocket/recvfrom_spec.rb
  75. +1 −1 spec/ruby/library/socket/unixsocket/send_io_spec.rb
  76. +1 −1 spec/ruby/library/socket/unixsocket/shared/new.rb
  77. +1 −1 spec/ruby/library/thread/sizedqueue/max_spec.rb
  78. +1 −1 spec/ruby/library/win32ole/win32ole/_invoke_spec.rb
  79. +1 −6 spec/ruby/optional/capi/bignum_spec.rb
  80. +2 −0 spec/ruby/optional/capi/ext/fixnum_spec.c
  81. +9 −3 spec/ruby/optional/capi/ext/io_spec.c
  82. +1 −3 spec/ruby/optional/capi/ext/string_spec.c
  83. +2 −0 spec/ruby/optional/capi/ext/thread_spec.c
  84. +1 −1 spec/ruby/optional/capi/ext/typed_data_spec.c
  85. +20 −18 spec/ruby/optional/capi/io_spec.rb
  86. +16 −14 spec/ruby/optional/capi/kernel_spec.rb
  87. +1 −1 spec/ruby/optional/capi/mutex_spec.rb
  88. +25 −35 spec/ruby/optional/capi/spec_helper.rb
  89. +3 −1 spec/ruby/optional/capi/time_spec.rb
  90. +4 −4 spec/ruby/security/cve_2013_4164_spec.rb
  91. +2 −2 spec/ruby/security/cve_2014_8080_spec.rb
  92. +1 −1 spec/ruby/shared/file/readable.rb
  93. +4 −8 spec/ruby/shared/time/strftime_for_date.rb
  94. +2 −0 spec/tags/ruby/core/binding/local_variable_set_tags.txt
  95. +1 −0 spec/tags/ruby/core/objectspace/each_object_tags.txt
  96. +2 −0 spec/tags/ruby/language/defined_tags.txt
1 change: 1 addition & 0 deletions spec/mspec/lib/mspec/helpers.rb
Original file line number Diff line number Diff line change
@@ -10,3 +10,4 @@
require 'mspec/helpers/ruby_exe'
require 'mspec/helpers/scratch'
require 'mspec/helpers/tmp'
require 'mspec/helpers/warning'
9 changes: 9 additions & 0 deletions spec/mspec/lib/mspec/helpers/warning.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class Object
def suppress_warning
verbose = $VERBOSE
$VERBOSE = nil
yield
ensure
$VERBOSE = verbose
end
end
19 changes: 19 additions & 0 deletions spec/mspec/spec/helpers/suppress_warning_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require 'spec_helper'
require 'mspec/guards'
require 'mspec/helpers'

describe Object, "#suppress_warning" do
it "hides warnings" do
suppress_warning do
warn "should not be shown"
end
end

it "yields the block" do
a = 0
suppress_warning do
a = 1
end
a.should == 1
end
end
4 changes: 4 additions & 0 deletions spec/mspec/tool/sync/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/jruby
/rubinius
/ruby
/truffleruby
210 changes: 210 additions & 0 deletions spec/mspec/tool/sync/sync-rubyspec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
IMPLS = {
truffleruby: {
git: "https://github.com/graalvm/truffleruby.git",
from_commit: "f10ab6988d",
},
jruby: {
git: "https://github.com/jruby/jruby.git",
from_commit: "f10ab6988d",
},
rbx: {
git: "https://github.com/rubinius/rubinius.git",
},
mri: {
git: "https://github.com/ruby/ruby.git",
master: "trunk",
prefix: "spec/rubyspec",
},
}

# Assuming the rubyspec repo is a sibling of the mspec repo
RUBYSPEC_REPO = File.expand_path("../../../../rubyspec", __FILE__)
raise RUBYSPEC_REPO unless Dir.exist?(RUBYSPEC_REPO)

NOW = Time.now

class RubyImplementation
attr_reader :name

def initialize(name, data)
@name = name.to_s
@data = data
end

def git_url
@data[:git]
end

def default_branch
@data[:master] || "master"
end

def repo_name
File.basename(git_url, ".git")
end

def repo_org
File.basename(File.dirname(git_url))
end

def from_commit
from = @data[:from_commit]
"#{from}..." if from
end

def prefix
@data[:prefix] || "spec/ruby"
end

def rebased_branch
"#{@name}-rebased"
end
end

def sh(*args)
puts args.join(' ')
system(*args)
raise unless $?.success?
end

def branch?(name)
branches = `git branch`.sub('*', '').lines.map(&:strip)
branches.include?(name)
end

def update_repo(impl)
unless File.directory? impl.repo_name
sh "git", "clone", impl.git_url
end

Dir.chdir(impl.repo_name) do
puts Dir.pwd

sh "git", "checkout", impl.default_branch
sh "git", "pull"
end
end

def filter_commits(impl)
Dir.chdir(impl.repo_name) do
date = NOW.strftime("%F")
branch = "specs-#{date}"

unless branch?(branch)
sh "git", "checkout", "-b", branch
sh "git", "filter-branch", "-f", "--subdirectory-filter", impl.prefix, *impl.from_commit
sh "git", "push", "-f", RUBYSPEC_REPO, "#{branch}:#{impl.name}"
end
end
end

def rebase_commits(impl)
Dir.chdir(RUBYSPEC_REPO) do
sh "git", "checkout", "master"
sh "git", "pull"

rebased = impl.rebased_branch
if branch?(rebased)
puts "#{rebased} already exists, assuming it correct"
sh "git", "checkout", rebased
else
sh "git", "checkout", impl.name

if ENV["LAST_MERGE"]
last_merge = `git log -n 1 --format='%H %ct' #{ENV["LAST_MERGE"]}`
else
last_merge = `git log --grep='Merge ruby/spec commit' -n 1 --format='%H %ct'`
end
last_merge, commit_timestamp = last_merge.chomp.split(' ')

raise "Could not find last merge" unless last_merge
puts "Last merge is #{last_merge}"

commit_date = Time.at(Integer(commit_timestamp))
days_since_last_merge = (NOW-commit_date) / 86400
if days_since_last_merge > 60
raise "#{days_since_last_merge} since last merge, probably wrong commit"
end

puts "Rebasing..."
sh "git", "branch", "-D", rebased if branch?(rebased)
sh "git", "checkout", "-b", rebased, impl.name
sh "git", "rebase", "--onto", "master", last_merge
end
end
end

def test_new_specs
require "yaml"
Dir.chdir(RUBYSPEC_REPO) do
versions = YAML.load_file(".travis.yml")
versions = versions["matrix"]["include"].map { |job| job["rvm"] }
versions.delete "ruby-head"
min_version, max_version = versions.minmax

run_rubyspec = -> version {
command = "chruby #{version} && ../mspec/bin/mspec -j"
sh ENV["SHELL"], "-c", command
}
run_rubyspec[min_version]
run_rubyspec[max_version]
run_rubyspec["trunk"]
end
end

def verify_commits(impl)
puts
Dir.chdir(RUBYSPEC_REPO) do
history = `git log master...`
history.lines.slice_before(/^commit \h{40}$/).each do |commit, *message|
commit = commit.chomp.split.last
message = message.join
if /\W(#\d+)/ === message
puts "Commit #{commit} contains an unqualified issue number: #{$1}"
puts "Replace it with #{impl.repo_org}/#{impl.repo_name}#{$1}"
sh "git", "rebase", "-i", "#{commit}^"
end
end

puts "Manually check commit messages:"
sh "git", "log", "master..."
end
end

def fast_forward_master(impl)
Dir.chdir(RUBYSPEC_REPO) do
sh "git", "checkout", "master"
sh "git", "merge", "--ff-only", "#{impl.name}-rebased"
end
end

def check_ci
puts
puts <<-EOS
Push to master, and check that the CI passes:
https://github.com/ruby/spec/commits/master
EOS
end

def main(impls)
impls.each_pair do |impl, data|
impl = RubyImplementation.new(impl, data)
update_repo(impl)
filter_commits(impl)
rebase_commits(impl)
test_new_specs
verify_commits(impl)
fast_forward_master(impl)
check_ci
end
end

if ARGV == ["all"]
impls = IMPLS
else
args = ARGV.map { |arg| arg.to_sym }
raise ARGV.to_s unless (args - IMPLS.keys).empty?
impls = IMPLS.select { |impl| args.include?(impl) }
end

main(impls)
4 changes: 4 additions & 0 deletions spec/mspec/tool/sync/sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mri: 4e95b8c265d4d365477a05fe6701186415576303
truffleruby: c8fb3e592bf354cd67893555c671955cc54c32ff
jruby: d834e4279090998ba3ef087d81278734cab4c50a
rbx: 7799d9fa48467cdbfceeed6765a63366d9dc8b0e
19 changes: 19 additions & 0 deletions spec/ruby/command_line/dash_upper_s_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require File.expand_path('../../spec_helper', __FILE__)

describe 'The -S command line option' do
before :each do
@path = [ENV['PATH'], fixture(__FILE__, "bin")].join(':')
end

platform_is_not :windows do
it "runs launcher found in PATH, but only code after the first /\#!.*ruby.*/-ish line in target file" do
result = ruby_exe(nil, options: '-S hybrid_launcher.sh', env: { 'PATH' => @path }, args: '2>&1')
result.should == "success\n"
end

it "runs launcher found in PATH" do
result = ruby_exe(nil, options: '-S launcher.rb', env: { 'PATH' => @path }, args: '2>&1')
result.should == "success\n"
end
end
end
17 changes: 13 additions & 4 deletions spec/ruby/command_line/dash_x_spec.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
describe "The -x command line option" do
before :each do
@file = fixture __FILE__, "embedded_ruby.txt"
it "runs code after the first /\#!.*ruby.*/-ish line in target file" do
embedded_ruby = fixture __FILE__, "bin/embedded_ruby.txt"
result = ruby_exe(embedded_ruby, options: '-x')
result.should == "success\n"
end

it "runs code after the first /\#!.*ruby.*/-ish line in target file" do
result = ruby_exe(@file, options: '-x')
it "fails when /\#!.*ruby.*/-ish line in target file is not found" do
bad_embedded_ruby = fixture __FILE__, "bin/bad_embedded_ruby.txt"
result = ruby_exe(bad_embedded_ruby, options: '-x', args: '2>&1')
result.should include "no Ruby script found in input"
end

it "behaves as -x was set when non-ruby shebang is encountered on first line" do
embedded_ruby = fixture __FILE__, "bin/hybrid_launcher.sh"
result = ruby_exe(embedded_ruby)
result.should == "success\n"
end

2 changes: 1 addition & 1 deletion spec/ruby/command_line/fixtures/bad_syntax.rb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f {
f {
3 changes: 3 additions & 0 deletions spec/ruby/command_line/fixtures/bin/bad_embedded_ruby.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@@@This line is not value Ruby
#!rub_y
puts 'success'
4 changes: 4 additions & 0 deletions spec/ruby/command_line/fixtures/bin/hybrid_launcher.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
exec somehow this file
#!ruby
puts 'success'
2 changes: 2 additions & 0 deletions spec/ruby/command_line/fixtures/bin/launcher.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!ruby
puts 'success'
4 changes: 2 additions & 2 deletions spec/ruby/core/bignum/bit_and_spec.rb
Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@
end

it "returns self bitwise AND other when one operand is negative" do
((2*bignum_value) & -1).should == 18446744073709551616
((4*bignum_value) & -1).should == 36893488147419103232
((2*bignum_value) & -1).should == (2*bignum_value)
((4*bignum_value) & -1).should == (4*bignum_value)
(@bignum & -0xffffffffffffff5).should == 9223372036854775809
(@bignum & -@bignum).should == 1
(@bignum & -0x8000000000000000).should == 9223372036854775808
10 changes: 10 additions & 0 deletions spec/ruby/core/binding/eval_spec.rb
Original file line number Diff line number Diff line change
@@ -13,6 +13,16 @@
bind.eval("Inside.name").should == "BindingSpecs::Demo::Inside"
end

it "does not leak variables to cloned bindings" do
obj = BindingSpecs::Demo.new(1)
bind = obj.get_empty_binding
bind2 = bind.dup

bind.eval("x = 72")
bind.local_variables.should == [:x]
bind2.local_variables.should == []
end

describe "with a file given" do
it "does not store the filename permanently" do
obj = BindingSpecs::Demo.new(1)
8 changes: 8 additions & 0 deletions spec/ruby/core/binding/fixtures/classes.rb
Original file line number Diff line number Diff line change
@@ -28,5 +28,13 @@ def get_file_of_binding
def get_empty_binding
binding
end

def get_binding_in_block
a = true
1.times do
b = false
return binding
end
end
end
end
11 changes: 11 additions & 0 deletions spec/ruby/core/binding/local_variable_get_spec.rb
Original file line number Diff line number Diff line change
@@ -42,4 +42,15 @@

bind.local_variable_get(:number).should == 10
end

it "raises a NameError on global access" do
bind = binding
lambda { bind.local_variable_get(:$0) }.should raise_error(NameError)
end

it "raises a NameError on special variable access" do
bind = binding
lambda { bind.local_variable_get(:$~) }.should raise_error(NameError)
lambda { bind.local_variable_get(:$_) }.should raise_error(NameError)
end
end
12 changes: 12 additions & 0 deletions spec/ruby/core/binding/local_variable_set_spec.rb
Original file line number Diff line number Diff line change
@@ -56,4 +56,16 @@
bind.local_variable_set(:number, 20)
bind.local_variable_get(:number).should == 20
end

it "raises a NameError on global access" do
bind = binding
lambda { bind.local_variable_set(:$0, "") }.should raise_error(NameError)
end

it "raises a NameError on special variable access" do
bind = binding
lambda { bind.local_variable_set(:$~, "") }.should raise_error(NameError)
lambda { bind.local_variable_set(:$_, "") }.should raise_error(NameError)
end

end
Loading