Skip to content

Commit

Permalink
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/string/split_tags.txt

This file was deleted.

2 changes: 1 addition & 1 deletion truffle/src/main/ruby/core/splitter.rb
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ module Rubinius
class Splitter
def self.split_characters(string, pattern, limit, tail_empty)
if limit
string.chars.take(limit - 1) << string[(limit - 1)..-1]
string.chars.take(limit - 1) << (string.chars.size > (limit - 1) ? string[(limit - 1)..-1] : "")

This comment has been minimized.

Copy link
@eregon

eregon Jun 16, 2016

Member

chars.size should be the same as size, right?

This comment has been minimized.

Copy link
@bjfish

bjfish Jun 16, 2016

Author Contributor

@eregon Yes, i think so. Fixed at aa57cb6. Thanks!

else
ret = string.chars.to_a
# Use #byteslice because it returns the right class and taints

2 comments on commit 99e11a9

@chrisseaton
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you modify a file like splitter.rb check the copyright header. This one only has the Rubinius header, but you've made your own modifications now, so you need to add ours above it.

# Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. This
# code is released under a tri EPL/GPL/LGPL license. You can use it,
# redistribute it and/or modify it under the terms of the:
#
# Eclipse Public License version 1.0
# GNU General Public License version 2
# GNU Lesser General Public License version 2.1

@bjfish
Copy link
Contributor Author

@bjfish bjfish commented on 99e11a9 Jun 16, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added the header at 5431912. Thanks @chrisseaton

Please sign in to comment.