Permalink
Browse files

Merge pull request #305 from ruby/update-snakeyaml

Update snakeyaml
  • Loading branch information...
2 parents d6f13f2 + 03872f4 commit ab38c3104b2417c8909beb6747e38420e6ec4a58 @headius headius committed on GitHub Dec 13, 2016
Showing with 6 additions and 5 deletions.
  1. +2 −0 .travis.yml
  2. +1 −1 Rakefile
  3. +2 −3 ext/java/PsychParser.java
  4. +1 −1 psych.gemspec
View
@@ -11,6 +11,8 @@ matrix:
before_install: gem install bundler --no-document
+script: rake
+
addons:
apt:
packages:
View
@@ -19,7 +19,7 @@ if RUBY_PLATFORM =~ /java/
# and tell maven via system properties the snakeyaml version
# this is basically the same as running from the commandline:
# rmvn dependency:build-classpath -Dsnakeyaml.version='use version from Psych::DEFAULT_SNAKEYAML_VERSION here'
- Maven::Ruby::Maven.new.exec('dependency:build-classpath', "-Dsnakeyaml.version=#{Psych::DEFAULT_SNAKEYAML_VERSION}", '-Dverbose=true')
+ Maven::Ruby::Maven.new.exec('dependency:build-classpath', "-Dsnakeyaml.version=1.17", '-Dverbose=true')
ext.source_version = '1.7'
ext.target_version = '1.7'
ext.classpath = File.read('pkg/classpath')
@@ -241,10 +241,9 @@ public IRubyObject parse(ThreadContext context, IRubyObject yaml, IRubyObject pa
private void handleDocumentStart(ThreadContext context, DocumentStartEvent dse, boolean tainted, IRubyObject handler) {
Ruby runtime = context.runtime;
DumperOptions.Version _version = dse.getVersion();
- Integer[] versionInts = _version == null ? null : _version.getArray();
- IRubyObject version = versionInts == null ?
+ IRubyObject version = _version == null ?
RubyArray.newArray(runtime) :
- RubyArray.newArray(runtime, runtime.newFixnum(versionInts[0]), runtime.newFixnum(versionInts[1]));
+ RubyArray.newArray(runtime, runtime.newFixnum(_version.major()), runtime.newFixnum(_version.minor()));
Map<String, String> tagsMap = dse.getTags();
RubyArray tags = RubyArray.newArray(runtime);
View
@@ -34,7 +34,7 @@ DESCRIPTION
if RUBY_ENGINE == 'jruby'
s.platform = 'java'
s.files.concat ["ext/java/PsychEmitter.java", "ext/java/PsychLibrary.java", "ext/java/PsychParser.java", "ext/java/PsychToRuby.java", "ext/java/PsychYamlTree.java", "lib/psych_jars.rb", "lib/psych.jar"]
- s.requirements = "jar org.yaml:snakeyaml, #{Psych::DEFAULT_SNAKEYAML_VERSION}"
+ s.requirements = "jar org.yaml:snakeyaml, 1.17"
s.add_dependency 'jar-dependencies', '>= 0.1.7'
s.add_development_dependency 'ruby-maven'
else

0 comments on commit ab38c31

Please sign in to comment.