Guest User

Untitled

a guest
Jan 23rd, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. private boolean[] join0(ThreadContext context, ByteList sep, int max, ByteList result) {
  2. boolean t = false;
  3. boolean u = false;
  4. try {
  5. for(int i = begin; i < max; i++) {
  6. IRubyObject val = values[i];
  7.  
  8. if(i > begin && sep != null) {
  9. result.append(sep);
  10. }
  11.  
  12. result.append(((RubyString)val).getByteList());
  13. if(val.isTaint()) {
  14. t = true;
  15. }
  16. if(val.isUntrusted()) {
  17. u = true;
  18. }
  19. }
  20. } catch (ArrayIndexOutOfBoundsException e) {
  21. concurrentModification();
  22. return new boolean[] {t,u};
  23. }
  24. return new boolean[]{t,u};
  25. }
  26.  
  27. AFTER:
  28. private RubyString join0(RubyString sep, int max, RubyString result) {
  29. try {
  30. for(int i = begin; i < max; i++) {
  31. if (i > begin && sep != null) result.append(sep);
  32. result.append(values[i]);
  33. }
  34. } catch (ArrayIndexOutOfBoundsException e) {
  35. concurrentModification();
  36. }
  37.  
  38. return result;
  39. }
Add Comment
Please, Sign In to add comment