Skip to content
Open
Prev Previous commit
Next Next commit
More String regression specs moved to jruby
  • Loading branch information
enebo committed Sep 4, 2025
commit 0ce0901c49e9c18cd9e2ba39b8375ef601679ab1
30 changes: 29 additions & 1 deletion spec/jruby/core/string/index_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,32 @@
str = "ßt®íngß — ßt®íngß"
expect(str.index(/\b/, 18)).to eq(nil)
end
end if RUBY_VERSION > "1.9"
end


describe 'JRUBY-6863' do
let(:str) do
str = "あいうえおかきくけこ"
end

subject do
(+str).slice!(3..-1) # => "えおかきくけこ"
end

it 'String#index without args' do
# See http://jira.codehaus.org/browse/JRUBY-xxxx
expect(subject.index(/[^ ]/)).to eq(0)
end

it 'String#index with args' do
expect(subject.index(/[^ ]/, 2)).to eq(2)
end

it 'String#rindex without args' do
expect(subject.rindex(/[^ ]/)).to eq(6)
end

it 'String#rindex with args' do
expect(subject.rindex(/[^ ]/, 2)).to eq(2)
end
end
29 changes: 0 additions & 29 deletions spec/regression/JRUBY-6863_index_after_slice_spec.rb

This file was deleted.