From d6f645cacf92e46b4c831921792b015ed0b091b1 Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Thu, 18 Jan 2024 19:42:13 -0600 Subject: [PATCH] Switch to default gem for nkf JRuby's implementation has moved to the gem: https://github.com/ruby/nkf/pull/15 The nkf library has been a default gem in CRuby since 3.0; this aligns 9.4 with that configuration. The gem will either move to bundled or out of stdlib altogether in Ruby 3.4 later this year, so I think we should take this step now. --- .gitignore | 2 + .../main/java/org/jruby/ext/nkf/Command.java | 59 -- .../java/org/jruby/ext/nkf/CommandParser.java | 71 --- .../main/java/org/jruby/ext/nkf/Option.java | 81 --- .../main/java/org/jruby/ext/nkf/Options.java | 110 ---- .../main/java/org/jruby/ext/nkf/RubyNKF.java | 602 ------------------ .../runtime/encoding/EncodingService.java | 7 - .../test/java/org/jruby/test/TestRubyNKF.java | 74 --- lib/pom.rb | 3 +- lib/pom.xml | 16 + lib/ruby/stdlib/kconv.rb | 283 -------- lib/ruby/stdlib/nkf.rb | 2 - 12 files changed, 19 insertions(+), 1291 deletions(-) delete mode 100644 core/src/main/java/org/jruby/ext/nkf/Command.java delete mode 100644 core/src/main/java/org/jruby/ext/nkf/CommandParser.java delete mode 100644 core/src/main/java/org/jruby/ext/nkf/Option.java delete mode 100644 core/src/main/java/org/jruby/ext/nkf/Options.java delete mode 100644 core/src/main/java/org/jruby/ext/nkf/RubyNKF.java delete mode 100644 core/src/test/java/org/jruby/test/TestRubyNKF.java delete mode 100644 lib/ruby/stdlib/kconv.rb delete mode 100644 lib/ruby/stdlib/nkf.rb diff --git a/.gitignore b/.gitignore index 7b38a79d16c..cf55dcd8327 100644 --- a/.gitignore +++ b/.gitignore @@ -87,6 +87,7 @@ lib/ruby/stdlib/jar* lib/ruby/stdlib/jline lib/ruby/stdlib/jopenssl* lib/ruby/stdlib/json* +lib/ruby/stdlib/kconv.rb lib/ruby/stdlib/krypt* lib/ruby/stdlib/libfixposix* lib/ruby/stdlib/logger* @@ -95,6 +96,7 @@ lib/ruby/stdlib/minitest* lib/ruby/stdlib/mutex_m.rb lib/ruby/stdlib/net/protocol* lib/ruby/stdlib/net/http* +lib/ruby/stdlib/nkf* lib/ruby/stdlib/observer* lib/ruby/stdlib/open3* lib/ruby/stdlib/open-uri* diff --git a/core/src/main/java/org/jruby/ext/nkf/Command.java b/core/src/main/java/org/jruby/ext/nkf/Command.java deleted file mode 100644 index adf38fab560..00000000000 --- a/core/src/main/java/org/jruby/ext/nkf/Command.java +++ /dev/null @@ -1,59 +0,0 @@ -/***** BEGIN LICENSE BLOCK ***** - * Version: EPL 2.0/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Eclipse Public - * License Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.eclipse.org/legal/epl-v20.html - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * Copyright (C) 2011 Koichiro Ohba - * - * Alternatively, the contents of this file may be used under the terms of - * either of the GNU General Public License Version 2 or later (the "GPL"), - * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the EPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the EPL, the GPL or the LGPL. - ***** END LICENSE BLOCK *****/ - -package org.jruby.ext.nkf; - -import java.util.List; -import java.util.ArrayList; - -public class Command { - private final List