An interpreter of object-oriented scripting language
IRB, when used from within ruby code using simple `require 'irb'; binding.irb`, a lot of warning messages about already initialized constants, similar to: "/usr/share/ruby/irb/ruby-lex.rb:123: warning: already initialized constant RubyLex::ERROR_TOKENS" "/usr/share/gems/gems/irb-1.3.5/lib/irb/ruby-lex.rb:123: warning: previous definition of ERROR_TOKENS was here" are printed. The warnings can be observed when invoking irb by calling `binding.irb` from Ruby code. $ echo "" | ruby -e binding.irb Actual results: ~~~ /usr/share/ruby/irb/ruby-lex.rb:123: warning: already initialized constant RubyLex::ERROR_TOKENS /usr/share/gems/gems/irb-1.3.5/lib/irb/ruby-lex.rb:123: warning: previous definition of ERROR_TOKENS was here /usr/share/ruby/irb/color.rb:8: warning: already initialized constant IRB::Color::CLEAR /usr/share/gems/gems/irb-1.3.5/lib/irb/color.rb:8: warning: previous definition of CLEAR was here /usr/share/ruby/irb/color.rb:9: warning: already initialized constant IRB::Color::BOLD /usr/share/gems/gems/irb-1.3.5/lib/irb/color.rb:9: warning: previous definition of BOLD was here /usr/share/ruby/irb/color.rb:10: warning: already initialized constant IRB::Color::UNDERLINE /usr/share/gems/gems/irb-1.3.5/lib/irb/color.rb:10: warning: previous definition of UNDERLINE was here /usr/share/ruby/irb/color.rb:11: warning: already initialized constant IRB::Color::REVERSE /usr/share/gems/gems/irb-1.3.5/lib/irb/color.rb:11: warning: previous definition of REVERSE was here /usr/share/ruby/irb/color.rb:12: warning: already initialized constant IRB::Color::RED /usr/share/gems/gems/irb-1.3.5/lib/irb/color.rb:12: warning: previous definition of RED was here /usr/share/ruby/irb/color.rb:13: warning: already initialized constant IRB::Color::GREEN /usr/share/gems/gems/irb-1.3.5/lib/irb/color.rb:13: warning: previous definition of GREEN was here /usr/share/ruby/irb/color.rb:14: warning: already initialized constant IRB::Color::YELLOW /usr/share/gems/gems/irb-1.3.5/lib/irb/color.rb:14: warning: previous definition of YELLOW was here /usr/share/ruby/irb/color.rb:15: warning: already initialized constant IRB::Color::BLUE /usr/share/gems/gems/irb-1.3.5/lib/irb/color.rb:15: warning: previous definition of BLUE was here /usr/share/ruby/irb/color.rb:16: warning: already initialized constant IRB::Color::MAGENTA /usr/share/gems/gems/irb-1.3.5/lib/irb/color.rb:16: warning: previous definition of MAGENTA was here /usr/share/ruby/irb/color.rb:17: warning: already initialized constant IRB::Color::CYAN /usr/share/gems/gems/irb-1.3.5/lib/irb/color.rb:17: warning: previous definition of CYAN was here /usr/share/ruby/irb/color.rb:19: warning: already initialized constant IRB::Color::TOKEN_KEYWORDS /usr/share/gems/gems/irb-1.3.5/lib/irb/color.rb:19: warning: previous definition of TOKEN_KEYWORDS was here /usr/share/ruby/irb/color.rb:26: warning: already initialized constant IRB::Color::ALL /usr/share/gems/gems/irb-1.3.5/lib/irb/color.rb:26: warning: previous definition of ALL was here /usr/share/ruby/irb/color.rb:32: warning: already initialized constant IRB::Color::TOKEN_SEQ_EXPRS /usr/share/gems/gems/irb-1.3.5/lib/irb/color.rb:32: warning: previous definition of TOKEN_SEQ_EXPRS was here /usr/share/ruby/irb/color.rb:75: warning: already initialized constant IRB::Color::ERROR_TOKENS /usr/share/gems/gems/irb-1.3.5/lib/irb/color.rb:75: warning: previous definition of ERROR_TOKENS was here Switch to inspect mode. ~~~ Expected results: No warning Patching the requires inside rubygem-irb to use `require_relative` instead resolves the situation. Patch composed from: https://github.com/ruby/irb/pull/335 |
||
---|---|---|
.gitlab/merge_request_templates | ||
.gitignore | ||
gating.yaml | ||
libruby.stp | ||
macros.ruby | ||
macros.rubygems | ||
operating_system.rb | ||
ruby-1.9.3-mkmf-verbose.patch | ||
ruby-2.1.0-always-use-i386.patch | ||
ruby-2.1.0-custom-rubygems-location.patch | ||
ruby-2.1.0-Enable-configuration-of-archlibdir.patch | ||
ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch | ||
ruby-2.3.0-ruby_version.patch | ||
ruby-2.7.0-Initialize-ABRT-hook.patch | ||
ruby-2.7.1-Timeout-the-test_bug_reporter_add-witout-raising-err.patch | ||
ruby-3.1.0-Add-more-support-for-generic-pkey-types.patch | ||
ruby-3.1.0-addr2line-DW_FORM_ref_addr.patch | ||
ruby-3.1.0-Allocate-EVP_PKEY-on-initialize.patch | ||
ruby-3.1.0-Allow-setting-algorithm-specific-options-in-sign-and-verify.patch | ||
ruby-3.1.0-Deprecate-PKey-set_-and-PKey-DH-EC-generate_key.patch | ||
ruby-3.1.0-Disable-test_no_private_exp-on-OpenSSL-3.0.patch | ||
ruby-3.1.0-Don-t-query-RubyVM-FrozenCore-for-class-path.patch | ||
ruby-3.1.0-Get-rid-of-type-punning-pointer-casts.patch | ||
ruby-3.1.0-Ignore-DW_FORM_ref_addr.patch | ||
ruby-3.1.0-Implement-PKey-encrypt-decrypt-sign_raw-verify_raw-and-verify_recover.patch | ||
ruby-3.1.0-Migrate-from-the-low-level-HMAC-API-to-the-EVP-API.patch | ||
ruby-3.1.0-Miscellaneous-changes-for-OpenSSL-3.0-support-part-2.patch | ||
ruby-3.1.0-Miscellaneous-changes-for-OpenSSL-3.0-support.patch | ||
ruby-3.1.0-Properly-exclude-test-cases.patch | ||
ruby-3.1.0-Refactor-PEM-DER-serialization-code.patch | ||
ruby-3.1.0-Support-GCCs-DWARF-5.patch | ||
ruby-3.1.0-test-openssl-test_digest-do-not-test-constants-for-l.patch | ||
ruby-3.1.0-test-openssl-test_pkcs12-fix-test-failures-with-Open.patch | ||
ruby-3.1.0-test-openssl-test_pkey-use-EC-keys-for-PKey.generate.patch | ||
ruby-3.1.0-test-openssl-test_ssl-relax-regex-to-match-OpenSSL-s.patch | ||
ruby-3.1.0-test-openssl-utils-remove-dup_public-helper-method.patch | ||
ruby-3.1.0-Use-EVP-API-in-more-places.patch | ||
ruby-3.1.0-Use-high-level-EVP-interface-to-generate-parameters-and-keys.patch | ||
ruby-3.1.0-Use-mmap-for-allocating-heap-pages-in-the-GC.patch | ||
ruby-3.1.0-Use-OSSL_DECODER-to-load-encrypted-PEM-on-OpenSSL-3.0.patch | ||
ruby-3.1.1-ossl_ocsp-use-null.patch | ||
ruby-3.1.2-ossl-tests-replace-sha1.patch | ||
ruby-3.2.0-define-unsupported-gc-compaction-methods_generated-files.patch | ||
ruby-3.2.0-define-unsupported-gc-compaction-methods-as-rb_f_notimplement.patch | ||
ruby-3.2.0-Detect-compaction-support-during-runtime.patch | ||
ruby-3.3.0-openssl-3.2.0-fips-enable-tests.patch | ||
ruby-3.3.0-openssl-3.2.0-fips-fix-pkey-dh-require-openssl.patch | ||
ruby-3.3.0-openssl-3.2.0-fips-fix-pkey-read-in-openssl-3.patch | ||
ruby-3.3.0-openssl-3.2.0-fix-fips-get-set-in-openssl-3.patch | ||
ruby-3.3.0-test-file-utime.patch | ||
ruby-3.3.1-Fix-test-session-reuse-but-expire.patch | ||
ruby-3.4.0-ruby-net-http-Renew-test-certificates.patch | ||
ruby-exercise.stp | ||
ruby-ext-openssl-extconf.rb-ignore-OpenSSL-version-check.patch | ||
ruby-spec-Fix-tests-on-tzdata-2022b.patch | ||
ruby.rpmlintrc | ||
ruby.spec | ||
rubygem-irb-1.4.2-Fix-already-initialized-constant-messages-from-require-in-scripts.patch | ||
rubygem-rexml-3.3.9-Fix-ReDoS-CVE-2024-49761.patch | ||
rubygems-3.2.30-Provide-distinguished-name-which-will-be-correctly-p.patch | ||
rubygems-3.2.33-Fix-loading-operating_system-rb-customizations-too-late.patch | ||
rubygems-3.3.1-Fix-compatibility-with-OpenSSL3.0.patch | ||
rubygems.attr | ||
rubygems.con | ||
rubygems.prov | ||
rubygems.req | ||
sources | ||
test_abrt.rb | ||
test_openssl_fips.rb | ||
test_systemtap.rb |