diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2025-05-28 19:12:04 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2025-05-28 19:12:04 +0000 |
| commit | 7be877b237e1ee2bc1ac4786b1c733d99ad7570c (patch) | |
| tree | 84aa11060a8ebfee674abb565ce4c5f8f4f4421d /dev-ruby/method_source | |
| parent | dee5c773ae48dc0de8ee6d9d81514101863a9eb4 (diff) | |
| download | baldeagleos-repo-7be877b237e1ee2bc1ac4786b1c733d99ad7570c.tar.gz baldeagleos-repo-7be877b237e1ee2bc1ac4786b1c733d99ad7570c.tar.xz baldeagleos-repo-7be877b237e1ee2bc1ac4786b1c733d99ad7570c.zip | |
Adding metadata
Diffstat (limited to 'dev-ruby/method_source')
| -rw-r--r-- | dev-ruby/method_source/files/method_source-1.1.0-prism.patch | 37 | ||||
| -rw-r--r-- | dev-ruby/method_source/method_source-1.1.0-r1.ebuild | 20 |
2 files changed, 57 insertions, 0 deletions
diff --git a/dev-ruby/method_source/files/method_source-1.1.0-prism.patch b/dev-ruby/method_source/files/method_source-1.1.0-prism.patch new file mode 100644 index 000000000000..5955bff3d744 --- /dev/null +++ b/dev-ruby/method_source/files/method_source-1.1.0-prism.patch @@ -0,0 +1,37 @@ +From 854c58f950559959d8e1e1fc0c186fda2867512e Mon Sep 17 00:00:00 2001 +From: Kevin Newton <kddnewton@gmail.com> +Date: Wed, 25 Sep 2024 15:08:35 -0400 +Subject: [PATCH] Update error message expectations to work on MRI with Prism + +--- + lib/method_source/code_helpers.rb | 2 +- + spec/method_source/code_helpers_spec.rb | 3 ++- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/lib/method_source/code_helpers.rb b/lib/method_source/code_helpers.rb +index 4185c18..9b4c68f 100644 +--- a/lib/method_source/code_helpers.rb ++++ b/lib/method_source/code_helpers.rb +@@ -125,7 +125,7 @@ module IncompleteExpression + GENERIC_REGEXPS = [ + /unexpected (\$end|end-of-file|end-of-input|END_OF_FILE)/, # mri, jruby, ruby-2.0, ironruby + /embedded document meets end of file/, # =begin +- /unterminated (quoted string|string|regexp|list) meets end of file/, # "quoted string" is ironruby ++ /unterminated (quoted string|string|regexp|list)( meets end of file|;)/, # "quoted string" is ironruby + /can't find string ".*" anywhere before EOF/, # rbx and jruby + /missing 'end' for/, /expecting kWHEN/ # rbx + ] +diff --git a/spec/method_source/code_helpers_spec.rb b/spec/method_source/code_helpers_spec.rb +index 287ff89..96f86d3 100644 +--- a/spec/method_source/code_helpers_spec.rb ++++ b/spec/method_source/code_helpers_spec.rb +@@ -36,7 +36,8 @@ + ]).compact.each do |foo| + it "should raise an error on invalid syntax like #{foo.inspect}" do + expect { +- @tester.complete_expression?(foo.join("\n")) ++ result = @tester.complete_expression?(foo.join("\n")) ++ raise SyntaxError if !result && foo == ["def", "method(1"] # prism on mri + }.to raise_error(SyntaxError) + end + end diff --git a/dev-ruby/method_source/method_source-1.1.0-r1.ebuild b/dev-ruby/method_source/method_source-1.1.0-r1.ebuild new file mode 100644 index 000000000000..8783c4193590 --- /dev/null +++ b/dev-ruby/method_source/method_source-1.1.0-r1.ebuild @@ -0,0 +1,20 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +USE_RUBY="ruby32 ruby33 ruby34" + +RUBY_FAKEGEM_RECIPE_TEST="rspec3" +RUBY_FAKEGEM_EXTRADOC="README.markdown" + +inherit ruby-fakegem + +DESCRIPTION="Retrieve the source code for a method" +HOMEPAGE="https://github.com/banister/method_source" +LICENSE="MIT" + +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + +PATCHES=( "${FILESDIR}/${P}-prism.patch" ) |
