rubygem-yard/rubygem-yard-0.8.7.6-fix-test-for-ruby-2.3.patch

23 lines
807 B
Diff

From afbcbc18efbf56ae81842094c78ac6ad218e9922 Mon Sep 17 00:00:00 2001
From: Loren Segal <lsegal@soen.ca>
Date: Thu, 14 Apr 2016 23:52:09 -0700
Subject: [PATCH] Fix brittle test on Ruby 2.3
Fixes #927
---
spec/parser/ruby/ruby_parser_spec.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spec/parser/ruby/ruby_parser_spec.rb b/spec/parser/ruby/ruby_parser_spec.rb
index 6e5bd89..07d7212 100644
--- a/spec/parser/ruby/ruby_parser_spec.rb
+++ b/spec/parser/ruby/ruby_parser_spec.rb
@@ -351,7 +351,7 @@ eof
# end comment
end
eof
- comment = ast.first.last.first
+ comment = ast.first.last.jump(:comment)
comment.type.should == :comment
comment.docstring_hash_flag.should be_true
comment.docstring.strip.should == "comment here"