Advertisement
Dan42

ruby gems: checking defined?(X) before using X

Jan 3rd, 2025 (edited)
2,121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 50.80 KB | None | 0 0
  1. #ack --group --ruby 'defined\?(?!.*defined\?).*?\b([A-Z]\w+\b).*\b\1\b'
  2.  
  3. CFPropertyList-2.3.6/lib/cfpropertylist/rbCFPropertyList.rb
  4. 163:      when Object.const_defined?('BigDecimal') && object.is_a?(BigDecimal)
  5.  
  6. CFPropertyList-3.0.5/lib/cfpropertylist/rbCFPropertyList.rb
  7. 147:      when Object.const_defined?('BigDecimal') && object.is_a?(BigDecimal)
  8.  
  9. actioncable-7.0.3/lib/action_cable/connection/base.rb
  10. 153:            environment = Rails.application.env_config.merge(env) if defined?(Rails.application) && Rails.application
  11.  
  12. actionmailer-7.0.3/lib/action_mailer/delivery_methods.rb
  13. 30:        location: defined?(Rails.root) ? "#{Rails.root}/tmp/mails" : "#{Dir.tmpdir}/mails"
  14.  
  15. actionmailer-7.0.3/lib/action_mailer/railtie.rb
  16. 28:        options.preview_path ||= defined?(Rails.root) ? "#{Rails.root}/test/mailers/previews" : nil
  17.  
  18. actionpack-7.0.3/lib/action_controller/log_subscriber.rb
  19. 34:        message << "\n\n" if defined?(Rails.env) && Rails.env.development?
  20.  
  21. actionpack-7.0.3/lib/action_controller/test_case.rb
  22. 47:      env = Rails.application.env_config.merge(env) if defined?(Rails.application) && Rails.application
  23. 590:          if ActionController::TestCase.executor_around_each_request && defined?(Rails.application) && Rails.application
  24.  
  25. actionpack-7.0.3/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
  26. 4:<p><code>Rails.root: <%= defined?(Rails) && Rails.respond_to?(:root) ? Rails.root : "unset" %></code></p>
  27.  
  28. actionpack-7.0.3/lib/action_dispatch/middleware/templates/rescues/_trace.text.erb
  29. 1:Rails.root: <%= defined?(Rails) && Rails.respond_to?(:root) ? Rails.root : "unset" %>
  30.  
  31. actionpack-7.0.3/lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb
  32. 13:    <% if defined?(ActiveStorage) && @exception.message.match?(%r{#{ActiveStorage::Blob.table_name}|#{ActiveStorage::Attachment.table_name}}) %>
  33. 16:    <% if defined?(ActionMailbox) && @exception.message.match?(%r{#{ActionMailbox::InboundEmail.table_name}}) %>
  34.  
  35. actionpack-7.0.3/lib/action_dispatch/middleware/templates/rescues/invalid_statement.text.erb
  36. 7:<% if defined?(ActiveStorage) && @exception.message.match?(%r{#{ActiveStorage::Blob.table_name}|#{ActiveStorage::Attachment.table_name}}) %>
  37. 10:<% if defined?(ActionMailbox) && @exception.message.match?(%r{#{ActionMailbox::InboundEmail.table_name}}) %>
  38.  
  39. actionpack-7.0.3/lib/action_dispatch/testing/test_request.rb
  40. 16:      env = Rails.application.env_config.merge(env) if defined?(Rails.application) && Rails.application
  41.  
  42. actionview-7.0.3/lib/action_view/template.rb
  43. 168:      @short_identifier ||= defined?(Rails.root) ? identifier.delete_prefix("#{Rails.root}/") : identifier
  44.  
  45. activerecord-7.0.3/lib/active_record/connection_adapters/sqlite3_adapter.rb
  46. 97:          database_file = defined?(Rails.root) ? File.expand_path(config[:database], Rails.root) : config[:database]
  47.  
  48. activerecord-7.0.3/lib/active_record/connection_handling.rb
  49. 5:    RAILS_ENV   = -> { (Rails.env if defined?(Rails.env)) || ENV["RAILS_ENV"].presence || ENV["RACK_ENV"].presence }
  50.  
  51. activerecord-7.0.3/lib/active_record/core.rb
  52. 86:          if defined?(ApplicationRecord) && self == ApplicationRecord
  53.  
  54. activerecord-7.0.3/lib/active_record/migration.rb
  55. 640:          root = defined?(ENGINE_ROOT) ? ENGINE_ROOT : Rails.root
  56.  
  57. activerecord-7.0.3/lib/active_record/railtie.rb
  58. 46:          if defined?(ENGINE_ROOT) && engine = Rails::Engine.find(ENGINE_ROOT)
  59.  
  60. activerecord-7.0.3/lib/rails/generators/active_record/migration.rb
  61. 31:          if defined?(Rails.application) && Rails.application
  62.  
  63. activesupport-7.0.3/lib/active_support/deprecation/behaviors.rb
  64. 27:            if defined?(Rails.logger) && Rails.logger
  65.  
  66. activesupport-7.0.3/lib/active_support/log_subscriber.rb
  67. 84:        @logger ||= if defined?(Rails) && Rails.respond_to?(:logger)
  68.  
  69. activesupport-7.0.3/lib/active_support/testing/isolation.rb
  70. 48:              test_result = defined?(Minitest::Result) ? Minitest::Result.from(self) : dup
  71. 73:            test_result = defined?(Minitest::Result) ? Minitest::Result.from(self) : dup
  72.  
  73. activesupport-7.0.3/lib/active_support/testing/tagged_logging.rb
  74. 23:          @tagged_logger ||= (defined?(Rails.logger) && Rails.logger)
  75.  
  76. airbrake-13.0.2/lib/airbrake/rack/context_filter.rb
  77. 47:          if defined?(::Rails) && ::Rails.respond_to?(:version)
  78.  
  79. airbrake-13.0.2/lib/airbrake/rack/route_filter.rb
  80. 47:        defined?(Sinatra::Request) && request.instance_of?(Sinatra::Request)
  81.  
  82. airbrake-ruby-6.1.1/lib/airbrake-ruby/backtrace.rb
  83. 135:        defined?(OCIError) && exception.is_a?(OCIError)
  84.  
  85. airbrake-ruby-6.1.1/lib/airbrake-ruby/config.rb
  86. 172:        (defined?(Bundler) && Bundler.root) ||
  87.  
  88. amq-protocol-2.3.2/lib/amq/protocol/table_value_encoder.rb
  89. 63:          if defined?(BigDecimal) && value.is_a?(BigDecimal)
  90.  
  91. autoprefixer-rails-10.4.7.0/lib/autoprefixer-rails/processor.rb
  92. 78:      from ||= if defined?(Rails) && Rails.respond_to?(:root) && Rails.root
  93.  
  94. awesome_print-1.9.2/lib/awesome_print/ext/active_support.rb
  95. 17:        if (defined?(::ActiveSupport::TimeWithZone) && object.is_a?(::ActiveSupport::TimeWithZone)) || object.is_a?(::Date)
  96.  
  97. awesome_print-1.9.2/lib/awesome_print/ext/mongoid.rb
  98. 23:        elsif (defined?(::BSON) && object.is_a?(::BSON::ObjectId)) || (defined?(::Moped::BSON) && object.is_a?(::Moped::BSON::ObjectId))
  99.  
  100. awesome_print-1.9.2/lib/awesome_print/ext/nokogiri.rb
  101. 18:      if (defined?(::Nokogiri::XML::Node) && object.is_a?(::Nokogiri::XML::Node)) ||
  102. 19:         (defined?(::Nokogiri::XML::NodeSet) && object.is_a?(::Nokogiri::XML::NodeSet))
  103.  
  104. awesome_print-1.9.2/lib/awesome_print/ext/ostruct.rb
  105. 15:      if (defined?(::OpenStruct)) && (object.is_a?(::OpenStruct))
  106.  
  107. awesome_print-1.9.2/lib/awesome_print/ext/sequel.rb
  108. 18:      if defined?(::Sequel::Model) && object.is_a?(::Sequel::Model)
  109. 20:      elsif defined?(::Sequel::Model) && object.is_a?(Class) && object.ancestors.include?(::Sequel::Model)
  110. 22:      elsif defined?(::Sequel::Mysql2::Dataset) && object.class.ancestors.include?(::Sequel::Mysql2::Dataset)
  111.  
  112. aws-sdk-v1-1.67.0/lib/aws/core/http/patch.rb
  113. 45:                   defined?(OpenSSL::SSL) ? OpenSSL::SSL::SSLError : IOError,
  114.  
  115. better_errors-2.9.1/lib/better_errors/inspectable_value.rb
  116. 38:      if defined?(ObjectSpace) && defined?(ObjectSpace.memsize_of) && ObjectSpace.memsize_of(value)
  117.  
  118. binding_of_caller-1.0.0/lib/binding_of_caller.rb
  119. 3:if defined?(RUBY_ENGINE) && RUBY_ENGINE == "ruby"
  120.  
  121. bootstrap-sass-3.4.1/lib/bootstrap-sass.rb
  122. 14:      elsif defined?(::Sass) && ::Sass.respond_to?(:load_paths)
  123.  
  124. brakeman-5.2.3/bundle/ruby/2.7.0/gems/erubis-2.7.0/contrib/erubis
  125. 3437:    if defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx"
  126.  
  127. brakeman-5.2.3/bundle/ruby/2.7.0/gems/erubis-2.7.0/lib/erubis/main.rb
  128. 488:    if defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx"
  129.  
  130. brakeman-5.2.3/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/railtie.rb
  131. 37:        if defined?(::Erubi) && (::ActionView::Template::Handlers::ERB.const_get('Erubi') != ::Erubi)
  132.  
  133. brakeman-5.2.3/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/terminal.rb
  134. 145:      defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
  135. 150:      defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx"
  136. 155:      defined?(RUBY_PLATFORM) && (RUBY_PLATFORM =~ /mswin|mingw|cygwin/)
  137.  
  138. brakeman-5.2.3/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb
  139. 7:  YAML_ENGINE = defined?(YAML::ENGINE) ? YAML::ENGINE.yamler : (defined?(Psych) && YAML == Psych ? "psych" : "syck")
  140.  
  141. brakeman-5.2.3/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/string_splitter.rb
  142. 10:      if defined?(Ripper) && RUBY_VERSION >= "2.0.0" && Ripper.respond_to?(:lex)
  143.  
  144. brakeman-5.2.3/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/static_analyzer.rb
  145. 33:        defined?(Ripper) && Ripper.respond_to?(:lex)
  146.  
  147. brakeman-5.2.3/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width.rb
  148. 48:unless defined?(Unicode::DisplayWidth::NO_STRING_EXT) && Unicode::DisplayWidth::NO_STRING_EXT
  149.  
  150. bunny-2.19.0/spec/spec_helper.rb
  151. 41:    !defined?(RUBY_ENGINE) || (defined?(RUBY_ENGINE) && ("ruby" == RUBY_ENGINE))
  152. 45:    defined?(RUBY_ENGINE) && (RUBY_ENGINE == 'rbx')
  153.  
  154. capistrano-3.17.0/lib/capistrano/doctor/environment_doctor.rb
  155. 13:          Bundler  #{defined?(Bundler::VERSION) ? Bundler::VERSION : 'N/A'}
  156.  
  157. capybara-3.37.1/lib/capybara/rspec/matcher_proxies.rb
  158. 31:        if defined?(::RSpec::Matchers) && base.include?(::RSpec::Matchers)
  159. 52:        base.include(::Capybara::RSpecMatcherProxies) if defined?(::RSpec::Matchers) && base.include?(::RSpec::Matchers)
  160.  
  161. capybara-3.37.1/lib/capybara/selenium/driver.rb
  162. 336:    defined?(Selenium::WebDriver::VERSION) && (Selenium::WebDriver::VERSION.to_f >= 4)
  163.  
  164. capybara-3.37.1/lib/capybara/selenium/driver_specializations/firefox_driver.rb
  165. 13:    (defined?(Selenium::WebDriver::VERSION) && (Selenium::WebDriver::VERSION.to_f >= 4)) ||
  166.  
  167. capybara-3.37.1/lib/capybara/selenium/node.rb
  168. 460:    (defined?(Selenium::WebDriver::VERSION) && (Selenium::WebDriver::VERSION.to_f >= 4)) ||
  169.  
  170. capybara-3.37.1/lib/capybara/selenium/patches/action_pauser.rb
  171. 23:if defined?(::Selenium::WebDriver::VERSION) && (::Selenium::WebDriver::VERSION.to_f < 4) &&
  172.  
  173. capybara-3.37.1/lib/capybara.rb
  174. 393:        [defined?(Nokogiri::HTML4) ? Nokogiri::HTML4 : Nokogiri::HTML, false]
  175.  
  176. capybara-3.37.1/spec/selenium_spec_chrome_remote.rb
  177. 35:  defined?(Selenium::WebDriver::VERSION) && (Selenium::WebDriver::VERSION.to_f >= version)
  178.  
  179. capybara-3.37.1/spec/spec_helper.rb
  180. 19:        ((defined?(::Selenium::WebDriver::VERSION) && (::Selenium::WebDriver::VERSION.to_f >= 4)) ||
  181.  
  182. celluloid-0.18.0/lib/celluloid/autostart.rb
  183. 7:Celluloid.register_shutdown unless defined?($CELLULOID_TEST) && $CELLULOID_TEST
  184.  
  185. celluloid-0.18.0/lib/celluloid/internals/cpu_counter.rb
  186. 31:          Java::Java.lang.Runtime.getRuntime.availableProcessors if defined? Java::Java
  187.  
  188. celluloid-0.18.0/spec/support/includer.rb
  189. 4:    (defined? INCLUDED_MODULE) ? INCLUDED_MODULE : Celluloid
  190.  
  191. celluloid-essentials-0.20.5/lib/celluloid/internals/cpu_counter.rb
  192. 33:          Java::Java.lang.Runtime.getRuntime.availableProcessors if defined? Java::Java
  193.  
  194. chef-17.10.0/lib/chef/http/http_request.rb
  195. 45:      engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"
  196.  
  197. chef-17.10.0/lib/chef/provider/package/rubygems.rb
  198. 136:            if defined?(Gem::Format) && Gem::Package.respond_to?(:open)
  199.  
  200. chef-17.10.0/lib/chef/resource/breakpoint.rb
  201. 96:        if defined?(Shell) && Shell.running?
  202.  
  203. chef-17.10.0/spec/support/ruby_installer.rb
  204. 38:  if defined?(RubyInstaller::Build) && RubyInstaller::Build.methods.include?(:add_dll_directory)
  205. 41:  elsif defined?(RubyInstaller::Runtime) && RubyInstaller::Runtime.methods.include?(:add_dll_directory)
  206.  
  207. chef-sugar-5.1.12/lib/chef/sugar/architecture.rb
  208. 23:      if !defined?(Chef::VERSION) || Gem::Requirement.new("< 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
  209. 139:      if !defined?(Chef::VERSION) || Gem::Requirement.new("< 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
  210.  
  211. chef-sugar-5.1.12/lib/chef/sugar/docker.rb
  212. 23:      if !defined?(Chef::VERSION) || Gem::Requirement.new("< 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
  213. 39:      if !defined?(Chef::VERSION) || Gem::Requirement.new("< 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
  214.  
  215. chef-sugar-5.1.12/lib/chef/sugar/kitchen.rb
  216. 23:      if !defined?(Chef::VERSION) || Gem::Requirement.new("< 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
  217. 39:      if !defined?(Chef::VERSION) || Gem::Requirement.new("< 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
  218.  
  219. chef-sugar-5.1.12/lib/chef/sugar/platform.rb
  220. 125:      if !defined?(Chef::VERSION) || Gem::Requirement.new("< 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
  221.  
  222. chef-sugar-5.1.12/lib/chef/sugar/platform_family.rb
  223. 23:      if !defined?(Chef::VERSION) || Gem::Requirement.new("< 15.4.70").satisfied_by?(Gem::Version.new(Chef::VERSION))
  224.  
  225. chef-sugar-5.1.12/lib/chef/sugar/shell.rb
  226. 26:      if !defined?(Chef::VERSION) || Gem::Requirement.new("< 16.0.257").satisfied_by?(Gem::Version.new(Chef::VERSION))
  227. 135:      if !defined?(Chef::VERSION) || Gem::Requirement.new("< 16.0.257").satisfied_by?(Gem::Version.new(Chef::VERSION))
  228.  
  229. chef-utils-17.10.0/lib/chef-utils/internal.rb
  230. 61:        return Chef.run_context&.node if defined?(Chef) && Chef.respond_to?(:run_context) && Chef.run_context&.node
  231. 87:      return Chef.run_context.transport_connection if defined?(Chef) && Chef.respond_to?(:run_context) && Chef&.run_context&.transport_connection
  232.  
  233. childprocess-4.1.0/lib/childprocess.rb
  234. 45:      elsif defined?(RUBY_ENGINE) && RUBY_ENGINE == "ironruby"
  235.  
  236. childprocess-4.1.0/spec/spec_helper.rb
  237. 17:  RUBY = defined?(Gem) ? Gem.ruby : 'ruby'
  238.  
  239. coderay-1.1.3/lib/coderay/scanners/scanner.rb
  240. 72:          @encoding ||= defined?(Encoding.find) && Encoding.find(name)
  241.  
  242. coercible-1.0.0/lib/coercible.rb
  243. 16:    @is_rbx ||= defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
  244.  
  245. colored2-3.1.2/lib/colored2/numbers.rb
  246. 1:require 'colored2' unless defined?(Colored2) && Colored2.respond_to?(:decorate)
  247.  
  248. colored2-3.1.2/lib/colored2/object.rb
  249. 1:require 'colored2' unless defined?(Colored2) && Colored2.respond_to?(:decorate)
  250.  
  251. colored2-3.1.2/lib/colored2/strings.rb
  252. 1:require 'colored2' unless defined?(Colored2) && Colored2.respond_to?(:decorate)
  253.  
  254. commander-fastlane-4.4.6/lib/commander/platform.rb
  255. 4:      defined?(RUBY_ENGINE) && (RUBY_ENGINE == 'jruby')
  256.  
  257. compass-1.0.3/lib/compass/test_case.rb
  258. 18:  class TestCase < (defined?(ActiveSupport::TestCase) ? ActiveSupport::TestCase : Test::Unit::TestCase)
  259.  
  260. compass-core-1.0.3/lib/compass/configuration/data.rb
  261. 99:        paths.map!{|p| defined?(Pathname) && Pathname === p ? p.to_s : p}
  262.  
  263. compass-core-1.0.3/lib/compass/configuration/defaults.rb
  264. 109:        elsif defined?(Sass::Plugin) && Sass::Plugin.options[:cache_location]
  265.  
  266. concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/thread_safe/util/cheap_lockable.rb
  267. 35:        engine = defined?(RUBY_ENGINE) && RUBY_ENGINE
  268.  
  269. concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/tuple.rb
  270. 27:    Tuple = defined?(Rubinius::Tuple) ? Rubinius::Tuple : ::Array
  271.  
  272. concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/utility/engine.rb
  273. 39:        defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby'
  274.  
  275. cucumber-core-10.1.1/lib/cucumber/core/platform.rb
  276. 9:    IRONRUBY      = defined?(RUBY_ENGINE) && RUBY_ENGINE == "ironruby"
  277.  
  278. cucumber-core-10.1.1/lib/cucumber/core/test/timer.rb
  279. 38:          elsif (defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby') == 'jruby'
  280.  
  281. cucumber-core-11.0.0/lib/cucumber/core/platform.rb
  282. 9:    IRONRUBY      = defined?(RUBY_ENGINE) && RUBY_ENGINE == "ironruby"
  283.  
  284. cucumber-core-11.0.0/lib/cucumber/core/test/timer.rb
  285. 38:          elsif (defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby') == 'jruby'
  286.  
  287. dalli-3.2.2/lib/dalli.rb
  288. 41:    (defined?(Rails) && Rails.respond_to?(:logger) && Rails.logger) ||
  289. 42:      (defined?(RAILS_DEFAULT_LOGGER) && RAILS_DEFAULT_LOGGER.respond_to?(:debug) && RAILS_DEFAULT_LOGGER)
  290.  
  291. debug-1.4.0/lib/debug/prelude.rb
  292. 16:      if !defined?(::DEBUGGER__::SO_VERSION) || ::DEBUGGER__::VERSION != ::DEBUGGER__::SO_VERSION
  293.  
  294. debug-1.4.0/lib/debug/session.rb
  295. 2058:    if defined?(SESSION) && SESSION.active?
  296. 2067:      return super unless defined?(SESSION) && SESSION.active?
  297. 2142:        if defined?(SESSION) && SESSION.active? && SESSION.intercept_trap_sigint?
  298. 2185:    return if !defined?(::DEBUGGER__::SESSION) || !::DEBUGGER__::SESSION.active?
  299.  
  300. debug-1.6.3/lib/debug/prelude.rb
  301. 17:      if !defined?(::DEBUGGER__::SO_VERSION) || ::DEBUGGER__::VERSION != ::DEBUGGER__::SO_VERSION
  302.  
  303. debug-1.6.3/lib/debug/session.rb
  304. 2221:    if defined?(SESSION) && SESSION.active?
  305. 2245:        return super unless defined?(SESSION) && SESSION.active?
  306. 2261:        return super unless defined?(SESSION) && SESSION.active?
  307. 2338:        if defined?(SESSION) && SESSION.active? && SESSION.intercept_trap_sigint?
  308. 2399:    return if !defined?(::DEBUGGER__::SESSION) || !::DEBUGGER__::SESSION.active?
  309.  
  310. debug_inspector-1.1.0/ext/debug_inspector/extconf.rb
  311. 10:  defined?(RUBY_ENGINE) && RUBY_ENGINE == "ruby" &&
  312.  
  313. devise-4.8.1/lib/devise/models/confirmable.rb
  314. 51:        if defined?(ActiveRecord) && self < ActiveRecord::Base # ActiveRecord
  315.  
  316. devise-4.8.1/lib/devise.rb
  317. 301:    defined?(ActiveRecord) && ActiveRecord.gem_version >= Gem::Version.new("5.1.x")
  318.  
  319. elastic-transport-8.0.1/lib/elastic/transport/meta_header.rb
  320. 127:        elsif defined?(Transport::HTTP::Curb) && @transport_class == Transport::HTTP::Curb
  321. 129:        elsif defined?(Transport::HTTP::Manticore) && @transport_class == Transport::HTTP::Manticore
  322.  
  323. elastic-transport-8.0.1/lib/elastic/transport/transport/base.rb
  324. 456:          if defined?(Elastic::Transport::Transport::HTTP::Manticore) && self.class == Elastic::Transport::Transport::HTTP::Manticore
  325.  
  326. elastic-transport-8.0.1/lib/elastic/transport/transport/http/faraday.rb
  327. 78:                ::Faraday.const_defined?(:ServerError) ? ::Faraday::ServerError : nil,
  328.  
  329. elastic-transport-8.0.1/spec/elastic/transport/meta_header_spec.rb
  330. 26:    let(:adapter_code) { "nh=#{defined?(Net::HTTP::VERSION) ? Net::HTTP::VERSION : Net::HTTP::HTTPVersion}" }
  331.  
  332. elastic-transport-8.0.1/test/unit/transport_manticore_test.rb
  333. 266:  version = "#{defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'Ruby'} #{RUBY_VERSION}"
  334.  
  335. elasticsearch-8.3.0/spec/unit/api_key_spec.rb
  336. 76:      let(:adapter_code) { "nh=#{defined?(Net::HTTP::VERSION) ? Net::HTTP::VERSION : Net::HTTP::HTTPVersion}" }
  337.  
  338. elasticsearch-transport-7.17.1/Rakefile
  339. 89:if defined?(RUBY_VERSION) && RUBY_VERSION > '1.9'
  340.  
  341. elasticsearch-transport-7.17.1/lib/elasticsearch/transport/meta_header.rb
  342. 127:        elsif defined?(Transport::HTTP::Curb) && @transport_class == Transport::HTTP::Curb
  343. 129:        elsif defined?(Transport::HTTP::Manticore) && @transport_class == Transport::HTTP::Manticore
  344.  
  345. elasticsearch-transport-7.17.1/lib/elasticsearch/transport/transport/base.rb
  346. 451:          if defined?(Elasticsearch::Transport::Transport::HTTP::Manticore) && self.class == Elasticsearch::Transport::Transport::HTTP::Manticore
  347.  
  348. elasticsearch-transport-7.17.1/lib/elasticsearch/transport/transport/connections/selector.rb
  349. 55:              connections.to_a.send( defined?(RUBY_VERSION) && RUBY_VERSION > '1.9' ? :sample : :choice)
  350.  
  351. elasticsearch-transport-7.17.1/spec/elasticsearch/transport/meta_header_spec.rb
  352. 27:    let(:adapter_code) { "nh=#{defined?(Net::HTTP::VERSION) ? Net::HTTP::VERSION : Net::HTTP::HTTPVersion}" }
  353.  
  354. elasticsearch-transport-7.17.1/test/test_helper.rb
  355. 38:if defined?(RUBY_VERSION) && RUBY_VERSION > '1.9'
  356. 56:if defined?(RUBY_VERSION) && RUBY_VERSION > '1.9'
  357.  
  358. elasticsearch-transport-7.17.1/test/unit/transport_manticore_test.rb
  359. 267:  version = "#{defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'Ruby'} #{RUBY_VERSION}"
  360.  
  361. erubi-1.10.0/lib/erubi.rb
  362. 25:      CGI.extend(defined?(::CGI::Escape) ? ::CGI::Escape : ::CGI::Util)
  363.  
  364. erubis-2.7.0/contrib/erubis
  365. 3437:    if defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx"
  366.  
  367. erubis-2.7.0/lib/erubis/main.rb
  368. 488:    if defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx"
  369.  
  370. erubis-2.7.0/test/testutil.rb
  371. 21:  defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx"
  372.  
  373. ethon-0.15.0/lib/ethon/easy/queryable.rb
  374. 90:        if defined?(MIME) && t = MIME::Types.type_for(filename).first
  375.  
  376. ethon-0.15.0/lib/ethon/loggable.rb
  377. 55:      defined?(::Rails) && ::Rails.respond_to?(:logger) && ::Rails.logger
  378.  
  379. excon-0.92.3/lib/excon/socket.rb
  380. 238:          if OpenSSL.const_defined?(:OPENSSL_LIBRARY_VERSION) && OpenSSL::OPENSSL_LIBRARY_VERSION.split(' ')[1] == '1.0.2'
  381.  
  382. executable-hooks-1.6.1/lib/rubygems_plugin.rb
  383. 9:  ( !defined?(Bundler) || ( defined?(Bundler) && Bundler::SharedHelpers.in_bundle? && !Bundler.settings[:disable_shared_gems]) )
  384.  
  385. facter-4.2.10/lib/facter/framework/core/fact_loaders/internal_fact_loader.rb
  386. 37:          type = class_name.const_defined?('TYPE') ? class_name::TYPE : :core
  387.  
  388. faraday-1.4.3/spec/faraday/utils/headers_spec.rb
  389. 42:      expected_error = defined?(KeyError) ? KeyError : IndexError
  390.  
  391. faraday-em_synchrony-1.0.0/lib/faraday/adapter/em_synchrony.rb
  392. 75:        if defined?(OpenSSL) && e.is_a?(OpenSSL::SSL::SSLError)
  393.  
  394. faraday-net_http-1.0.1/lib/faraday/adapter/net_http.rb
  395. 68:            raise Faraday::SSLError, e if defined?(OpenSSL) && e.is_a?(OpenSSL::SSL::SSLError)
  396.  
  397. ffi-1.15.5/lib/ffi/library.rb
  398. 98:      lib_flags = defined?(@ffi_lib_flags) ? @ffi_lib_flags : FFI::DynamicLibrary::RTLD_LAZY | FFI::DynamicLibrary::RTLD_LOCAL
  399.  
  400. ffi-yajl-2.4.0/lib/ffi_yajl/benchmark/encode.rb
  401. 7:if !defined?(RUBY_ENGINE) || RUBY_ENGINE !~ /jruby/
  402.  
  403. ffi-yajl-2.4.0/lib/ffi_yajl/benchmark/parse.rb
  404. 5:if !defined?(RUBY_ENGINE) || RUBY_ENGINE !~ /jruby/
  405.  
  406. foreman-0.87.2/lib/foreman.rb
  407. 10:    defined?(RUBY_VERSION) and RUBY_VERSION =~ /^1\.8\.\d+/
  408. 14:    defined?(RUBY_PLATFORM) and RUBY_PLATFORM =~ /(win|w)32$/
  409.  
  410. haml-5.2.2/lib/haml/railtie.rb
  411. 37:        if defined?(::Erubi) && (::ActionView::Template::Handlers::ERB.const_get('Erubi') != ::Erubi)
  412.  
  413. highline-1.7.10/lib/highline/system_extensions.rb
  414. 12:    JRUBY = defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
  415.  
  416. hiredis-0.6.3/lib/hiredis/ruby/connection.rb
  417. 9:      if defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx"
  418. 26:      if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
  419.  
  420. http-form_data-2.3.0/lib/http/form_data/file.rb
  421. 54:        elsif defined?(Pathname) && path_or_io.is_a?(Pathname)
  422.  
  423. httpclient-2.8.3/test/test_hexdump.rb
  424. 12:end if defined?(RUBY_ENGINE) && RUBY_ENGINE != "rbx" && RUBY_VERSION >= "1.9.0"
  425.  
  426. inspec-core-4.56.20/lib/inspec/reporters/cli.rb
  427. 225:      return text if defined?(RSpec.configuration) && !RSpec.configuration.color
  428.  
  429. inspec-core-4.56.20/lib/inspec/resource.rb
  430. 70:      test_backend = defined?(Train::Transports::Mock::Connection) && backend.backend.class == Train::Transports::Mock::Connection
  431.  
  432. journey-1.0.4/lib/journey/router/utils.rb
  433. 42:      Parser = URI.const_defined?(:Parser) ? URI::Parser.new : URI
  434.  
  435. json-1.8.6/Rakefile
  436. 195:if defined?(RUBY_ENGINE) and RUBY_ENGINE == 'jruby'
  437.  
  438. json-1.8.6/lib/json/add/bigdecimal.rb
  439. 1:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  440.  
  441. json-1.8.6/lib/json/add/complex.rb
  442. 1:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  443.  
  444. json-1.8.6/lib/json/add/date.rb
  445. 1:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  446.  
  447. json-1.8.6/lib/json/add/date_time.rb
  448. 1:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  449.  
  450. json-1.8.6/lib/json/add/exception.rb
  451. 1:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  452.  
  453. json-1.8.6/lib/json/add/ostruct.rb
  454. 1:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  455.  
  456. json-1.8.6/lib/json/add/range.rb
  457. 1:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  458.  
  459. json-1.8.6/lib/json/add/rational.rb
  460. 1:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  461.  
  462. json-1.8.6/lib/json/add/regexp.rb
  463. 1:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  464.  
  465. json-1.8.6/lib/json/add/struct.rb
  466. 1:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  467.  
  468. json-1.8.6/lib/json/add/symbol.rb
  469. 1:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  470.  
  471. json-1.8.6/lib/json/add/time.rb
  472. 1:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  473.  
  474. json_pure-2.6.2/lib/json/add/bigdecimal.rb
  475. 2:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  476.  
  477. json_pure-2.6.2/lib/json/add/complex.rb
  478. 2:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  479.  
  480. json_pure-2.6.2/lib/json/add/date.rb
  481. 2:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  482.  
  483. json_pure-2.6.2/lib/json/add/date_time.rb
  484. 2:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  485.  
  486. json_pure-2.6.2/lib/json/add/exception.rb
  487. 2:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  488.  
  489. json_pure-2.6.2/lib/json/add/ostruct.rb
  490. 2:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  491.  
  492. json_pure-2.6.2/lib/json/add/range.rb
  493. 2:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  494.  
  495. json_pure-2.6.2/lib/json/add/rational.rb
  496. 2:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  497.  
  498. json_pure-2.6.2/lib/json/add/regexp.rb
  499. 2:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  500.  
  501. json_pure-2.6.2/lib/json/add/set.rb
  502. 1:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  503.  
  504. json_pure-2.6.2/lib/json/add/struct.rb
  505. 2:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  506.  
  507. json_pure-2.6.2/lib/json/add/symbol.rb
  508. 2:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  509.  
  510. json_pure-2.6.2/lib/json/add/time.rb
  511. 2:unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
  512.  
  513. jwt-2.4.1/lib/jwt/security_utils.rb
  514. 46:      return [] unless defined?(RbNaCl) && RbNaCl::HMAC.constants(false).include?(algorithm)
  515.  
  516. kgio-2.11.4/test/test_cross_thread_close.rb
  517. 19:    unless defined?(RUBY_ENGINE) && RUBY_ENGINE == "ruby" &&
  518. 26:end if defined?(RUBY_ENGINE) && RUBY_ENGINE == "ruby"
  519.  
  520. knapsack-4.0.0/lib/knapsack/adapters/rspec_adapter.rb
  521. 50:        if defined?(::Turnip) && Gem::Version.new(::Turnip::VERSION) < Gem::Version.new('2.0.0')
  522.  
  523. kramdown-2.4.0/lib/kramdown/converter.rb
  524. 41:        if !klass.const_defined?(:AVAILABLE) || klass::AVAILABLE
  525. 57:        if !klass.const_defined?(:AVAILABLE) || klass::AVAILABLE
  526.  
  527. launchy-2.5.0/lib/launchy/detect/ruby_engine.rb
  528. 44:        @ruby_engine = defined?( RUBY_ENGINE ) ? RUBY_ENGINE : "ruby"
  529.  
  530. logging-2.3.1/lib/logging/log_event.rb
  531. 15:    CALLER_INDEX = ((defined?(JRUBY_VERSION) && JRUBY_VERSION > '1.6' && JRUBY_VERSION < '9.0') ||
  532. 16:                    (defined?(RUBY_ENGINE) && RUBY_ENGINE[%r/^rbx/i])) ? 1 : 2
  533.  
  534. logging-2.3.1/lib/logging/utils.rb
  535. 108:  conf = defined?(RbConfig) ? RbConfig::CONFIG : Config::CONFIG
  536.  
  537. mail-2.7.1/lib/mail/utilities.rb
  538. 167:      @uri_parser ||= URI.const_defined?(:Parser) ? URI::Parser.new : URI
  539.  
  540. marcel-1.0.2/lib/marcel/mime_type.rb
  541. 63:          if defined?(Pathname) && pathname_or_io.is_a?(Pathname)
  542.  
  543. method_source-1.0.0/lib/method_source/source_location.rb
  544. 15:      elsif defined?(RUBY_ENGINE) && RUBY_ENGINE =~ /jruby/
  545. 58:      elsif defined?(RUBY_ENGINE) && RUBY_ENGINE =~ /rbx/
  546. 85:      elsif defined?(RUBY_ENGINE) && RUBY_ENGINE =~ /jruby/
  547.  
  548. method_source-1.0.0/spec/method_source_spec.rb
  549. 71:    unless defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
  550.  
  551. method_source-1.0.0/spec/spec_helper.rb
  552. 5:  defined?(RUBY_ENGINE) && RUBY_ENGINE =~ /rbx/
  553. 9:  defined?(RUBY_ENGINE) && RUBY_ENGINE =~ /jruby/
  554.  
  555. minitest-5.15.0/lib/minitest.rb
  556. 57:    if Object.const_defined?(:Warning) && Warning.respond_to?(:[]=)
  557. 974:    def maglev? platform = defined?(RUBY_ENGINE) && RUBY_ENGINE
  558. 998:    def rubinius? platform = defined?(RUBY_ENGINE) && RUBY_ENGINE
  559.  
  560. mocha-1.14.0/Rakefile
  561. 37:    t.test_files = if defined?(RUBY_VERSION) && (RUBY_VERSION >= '1.8.7')
  562. 88:  if RUBY_VERSION >= '2.2.0' && (defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ruby') && ENV['MOCHA_RUN_INTEGRATION_TESTS'].nil?
  563.  
  564. mocha-1.14.0/lib/mocha/detection/test_unit.rb
  565. 6:           !(defined?(::MiniTest::Unit::TestCase) && (::Test::Unit::TestCase < ::MiniTest::Unit::TestCase)) &&
  566. 7:           !(defined?(::MiniTest::Spec) && (::Test::Unit::TestCase < ::MiniTest::Spec))
  567.  
  568. mongo-2.17.1/lib/mongo/socket.rb
  569. 408:      defined?(UNIXSocket) && sock.is_a?(UNIXSocket)
  570.  
  571. msgpack-1.5.2/ext/msgpack/extconf.rb
  572. 15:if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
  573.  
  574. msgpack-1.5.2/lib/msgpack.rb
  575. 3:if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby" # This is same with `/java/ =~ RUBY_VERSION`
  576.  
  577. mustermann-1.1.1/lib/mustermann.rb
  578. 121:    return super unless defined? ::Sinatra::Base and object.is_a? Class and object < ::Sinatra::Base
  579.  
  580. mysql2-0.5.4/lib/mysql2.rb
  581. 48:if defined?(ActiveRecord::VERSION::STRING) && ActiveRecord::VERSION::STRING < "3.1"
  582.  
  583. net-ssh-6.1.0/lib/net/ssh/authentication/agent.rb
  584. 195:          defined?(UNIXSocket) && UNIXSocket
  585.  
  586. net-ssh-6.1.0/lib/net/ssh/service/forward.rb
  587. 66:            if defined?(UNIXServer) and args.first.class == UNIXServer
  588.  
  589. net-ssh-7.0.1/lib/net/ssh/authentication/agent.rb
  590. 211:          defined?(UNIXSocket) && UNIXSocket
  591.  
  592. net-ssh-7.0.1/lib/net/ssh/service/forward.rb
  593. 65:            if defined?(UNIXServer) and args.first.class == UNIXServer
  594.  
  595. newrelic_rpm-8.8.0/lib/new_relic/agent/database/explain_plan_helpers.rb
  596. 50:          elsif defined?(::ActiveRecord::Result) && results.is_a?(::ActiveRecord::Result)
  597. 70:          if defined?(::ActiveRecord::Result) && results.is_a?(::ActiveRecord::Result)
  598.  
  599. newrelic_rpm-8.8.0/lib/new_relic/agent/error_collector.rb
  600. 204:        actual_exception = if defined?(Rails::VERSION::MAJOR) && Rails::VERSION::MAJOR < 5
  601.  
  602. newrelic_rpm-8.8.0/lib/new_relic/agent/instrumentation/active_record.rb
  603. 22:          if defined?(::ActiveRecord::VERSION::MAJOR) && ::ActiveRecord::VERSION::MAJOR.to_i >= 3
  604. 160:    if defined?(::Rails::VERSION::MAJOR) && ::Rails::VERSION::MAJOR.to_i == 3
  605.  
  606. newrelic_rpm-8.8.0/lib/new_relic/agent/instrumentation/active_record_subscriber.rb
  607. 35:          if defined?(::ActiveRecord) && ::ActiveRecord::VERSION::STRING >= "5.1.0"
  608.  
  609. newrelic_rpm-8.8.0/lib/new_relic/agent/instrumentation/grape/instrumentation.rb
  610. 15:        defined?(::Grape::API::Instance) ? ::Grape::API::Instance : ::Grape::API
  611. 31:        if defined?(::Grape::VERSION) && Gem::Version.new(::Grape::VERSION) >= Gem::Version.new("0.16.0")
  612.  
  613. newrelic_rpm-8.8.0/lib/new_relic/agent/instrumentation/grape.rb
  614. 22:      if defined?(Bundler) && Bundler.rubygems.all_specs.map(&:name).include?("newrelic-grape")
  615.  
  616. newrelic_rpm-8.8.0/lib/new_relic/agent/instrumentation/middleware_proxy.rb
  617. 39:          defined?(::Sinatra::Base) && target.kind_of?(::Sinatra::Base)
  618.  
  619. newrelic_rpm-8.8.0/lib/new_relic/agent/instrumentation/net_http.rb
  620. 22:    defined?(::Airbrake) && defined?(::Airbrake::AIRBRAKE_VERSION) && ::Gem::Version.create(::Airbrake::AIRBRAKE_VERSION) < ::Gem::Version.create('10.0.2')
  621.  
  622. newrelic_rpm-8.8.0/lib/new_relic/agent/instrumentation/rails3/action_controller.rb
  623. 69:    defined?(::Rails::VERSION::MAJOR) && ::Rails::VERSION::MAJOR.to_i == 3
  624.  
  625. newrelic_rpm-8.8.0/lib/new_relic/agent/instrumentation/rails_middleware.rb
  626. 15:    defined?(::Rails::VERSION::MAJOR) && ::Rails::VERSION::MAJOR.to_i >= 3
  627.  
  628. newrelic_rpm-8.8.0/lib/new_relic/agent/instrumentation/rails_notifications/action_controller.rb
  629. 11:    defined?(::Rails::VERSION::MAJOR) && ::Rails::VERSION::MAJOR.to_i >= 4
  630.  
  631. newrelic_rpm-8.8.0/lib/new_relic/agent/instrumentation/rails_notifications/action_view.rb
  632. 11:    defined?(::Rails::VERSION::MAJOR) && ::Rails::VERSION::MAJOR.to_i >= 4
  633.  
  634. newrelic_rpm-8.8.0/lib/new_relic/agent/instrumentation/resque.rb
  635. 18:    defined?(::Airbrake) && defined?(::Airbrake::AIRBRAKE_VERSION) && ::Gem::Version.create(::Airbrake::AIRBRAKE_VERSION) < ::Gem::Version.create('11.0.3')
  636.  
  637. newrelic_rpm-8.8.0/lib/new_relic/agent/logging.rb
  638. 122:      class DecoratingLogger < (defined?(::ActiveSupport) && defined?(::ActiveSupport::Logger) ? ::ActiveSupport::Logger : ::Logger)
  639.  
  640. newrelic_rpm-8.8.0/lib/new_relic/agent/new_relic_service.rb
  641. 632:        zlib_version << "zlib/#{Zlib.zlib_version}" if defined?(::Zlib) && Zlib.respond_to?(:zlib_version)
  642.  
  643. newrelic_rpm-8.8.0/lib/new_relic/agent/parameter_filtering.rb
  644. 12:      if defined?(Rails) && Gem::Version.new(::Rails::VERSION::STRING) >= Gem::Version.new('5.0.0')
  645.  
  646. newrelic_rpm-8.8.0/lib/new_relic/control/frameworks/rails.rb
  647. 35:          if defined?(::Rails) && ::Rails.respond_to?(:configuration)
  648.  
  649. newrelic_rpm-8.8.0/lib/new_relic/control/instrumentation.rb
  650. 72:      return unless defined?(Rails::VERSION) && Gem::Version.new(Rails::VERSION::STRING) <= Gem::Version.new('3.2')
  651.  
  652. newrelic_rpm-8.8.0/lib/new_relic/environment_report.rb
  653. 80:      if defined? ::Rails and ::Rails.respond_to?(:env)
  654.  
  655. newrelic_rpm-8.8.0/lib/new_relic/language_support.rb
  656. 76:      defined?(Bundler) && Bundler.rubygems.all_specs.map(&:name).include?(gem_name)
  657.  
  658. newrelic_rpm-8.8.0/lib/new_relic/noticed_error.rb
  659. 196:      if defined?(Rails::VERSION::MAJOR) && Rails::VERSION::MAJOR < 5 && exception.respond_to?(:original_exception)
  660.  
  661. newrelic_rpm-8.8.0/lib/new_relic/recipes/capistrano_legacy.rb
  662. 85:if defined?(Capistrano::Version::MAJOR) && Capistrano::Version::MAJOR < 2
  663.  
  664. newrelic_rpm-8.8.0/lib/new_relic/recipes.rb
  665. 20:if defined?(Capistrano::VERSION) && Capistrano::VERSION.to_s.split('.').first.to_i >= 3
  666.  
  667. newrelic_rpm-8.8.0/lib/sequel/extensions/newrelic_instrumentation.rb
  668. 81:      (defined?(::Sequel::ThreadedConnectionPool) && ::Sequel::ThreadedConnectionPool)
  669.  
  670. nio4r-2.5.8/lib/nio/monitor.rb
  671. 11:      unless defined?(::OpenSSL) && io.is_a?(::OpenSSL::SSL::SSLSocket)
  672.  
  673. nio4r-2.5.8/lib/nio/selector.rb
  674. 49:      unless defined?(::OpenSSL) && io.is_a?(::OpenSSL::SSL::SSLSocket)
  675.  
  676. nokogiri-1.13.6-x86_64-linux/lib/nokogiri/version/info.rb
  677. 23:      defined?(::RUBY_ENGINE) ? ::RUBY_ENGINE : "mri"
  678. 53:      defined?(Nokogiri::LIBXML_ICONV_ENABLED) && Nokogiri::LIBXML_ICONV_ENABLED
  679. 57:      defined?(Nokogiri::LIBXSLT_DATETIME_ENABLED) && Nokogiri::LIBXSLT_DATETIME_ENABLED
  680.  
  681. nokogiri-1.13.6-x86_64-linux/lib/nokogiri.rb
  682. 6:if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
  683.  
  684. nokogiri-1.13.8-x86_64-linux/lib/nokogiri/version/info.rb
  685. 23:      defined?(::RUBY_ENGINE) ? ::RUBY_ENGINE : "mri"
  686. 53:      defined?(Nokogiri::LIBXML_ICONV_ENABLED) && Nokogiri::LIBXML_ICONV_ENABLED
  687. 57:      defined?(Nokogiri::LIBXSLT_DATETIME_ENABLED) && Nokogiri::LIBXSLT_DATETIME_ENABLED
  688.  
  689. nokogiri-1.13.8-x86_64-linux/lib/nokogiri.rb
  690. 6:if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
  691.  
  692. oauth-0.5.10/lib/oauth/request_proxy/action_controller_request.rb
  693. 33:      proxies(defined?(::ActionDispatch::AbstractRequest) ? ::ActionDispatch::AbstractRequest : ::ActionDispatch::Request)
  694.  
  695. octokit-4.25.0/lib/octokit/response/base_middleware.rb
  696. 8:    BaseMiddleware = defined?(Faraday::Response::Middleware) ? Faraday::Response::Middleware : Faraday::Middleware
  697.  
  698. oj-3.13.14/test/activesupport5/abstract_unit.rb
  699. 43:    Object.const_defined?(:FrozenError) ? FrozenError : RuntimeError
  700.  
  701. os-1.1.4/lib/os.rb
  702. 72:     if defined?(RUBY_ENGINE) && (RUBY_ENGINE == 'ironruby')
  703.  
  704. os-1.1.4/spec/os_spec.rb
  705. 46:    if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ironruby'
  706. 114:    if defined?(RUBY_DESCRIPTION) && RUBY_DESCRIPTION =~ /^(jruby|java)/
  707.  
  708. paperclip-6.1.0/lib/paperclip/processor_helpers.rb
  709. 18:      if defined?(Rails.root) && Rails.root
  710.  
  711. poltergeist-1.18.1/lib/capybara/poltergeist/utility.rb
  712. 11:        defined?(RUBY_ENGINE) && RUBY_ENGINE == "ruby"
  713.  
  714. powerpack-0.1.3/spec/powerpack/string/ascii_only_spec.rb
  715. 5:unless defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
  716.  
  717. pry-0.13.1/lib/pry/output.rb
  718. 115:      return unless defined?(Readline) && Readline.respond_to?(:get_screen_size)
  719.  
  720. pry-0.13.1/lib/pry/pry_class.rb
  721. 294:    if !defined?(Readline) || Pry.config.input != Readline
  722.  
  723. pry-0.13.1/lib/pry/repl.rb
  724. 203:      defined?(Readline) && input == Readline
  725. 207:      defined?(Coolline) && input.is_a?(Coolline)
  726.  
  727. pry-0.13.1/lib/pry/wrapped_module.rb
  728. 266:      !!(defined?(YARD) && YARD::Registry.at(name))
  729.  
  730. pry-0.14.1/lib/pry/output.rb
  731. 115:      return unless defined?(Readline) && Readline.respond_to?(:get_screen_size)
  732.  
  733. pry-0.14.1/lib/pry/pry_class.rb
  734. 291:    if !defined?(Readline) || Pry.config.input != Readline
  735.  
  736. pry-0.14.1/lib/pry/repl.rb
  737. 203:      defined?(Readline) && input == Readline
  738. 207:      defined?(Coolline) && input.is_a?(Coolline)
  739.  
  740. pry-0.14.1/lib/pry/wrapped_module.rb
  741. 266:      !!(defined?(YARD) && YARD::Registry.at(name))
  742.  
  743. pry-rails-0.3.9/lib/pry-rails/commands/show_model.rb
  744. 34:    when defined?(ActiveRecord::Base) && model < ActiveRecord::Base
  745. 36:    when defined?(Mongoid::Document) && model < Mongoid::Document
  746.  
  747. puma-5.6.4/lib/puma/runner.rb
  748. 83:      if !defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby"
  749.  
  750. rack-2.2.3.1/lib/rack/server.rb
  751. 223:        argv = defined?(SPEC_ARGV) ? SPEC_ARGV : ARGV
  752.  
  753. rack-cache-1.13.0/lib/rack/cache/storage.rb
  754. 47:        when defined?(::Dalli) && uri.kind_of?(::Dalli::Client)
  755.  
  756. rack-cors-1.1.1/lib/rack/cors.rb
  757. 144:        elsif defined?(Rails) && Rails.respond_to?(:logger) && Rails.logger
  758.  
  759. rack-protection-2.2.0/lib/rack/protection/escaped_params.rb
  760. 33:        :escaper => defined?(EscapeUtils) ? EscapeUtils : self
  761.  
  762. rack-test-2.0.2/lib/rack/test.rb
  763. 257:      if !defined?(Rack::RELEASE) || Gem::Version.new(Rack::RELEASE) < Gem::Version.new('2.2.2')
  764.  
  765. railties-7.0.3/lib/rails/generators/named_base.rb
  766. 139:          if defined?(Rails) && Rails.application
  767. 197:          !defined?(ActiveRecord::Base) || ActiveRecord::Base.pluralize_table_names
  768.  
  769. railties-7.0.3/lib/rails/generators/rails/app/app_generator.rb
  770. 558:        defined?(::AppBuilder) ? ::AppBuilder : Rails::AppBuilder
  771.  
  772. railties-7.0.3/lib/rails/generators/rails/plugin/plugin_generator.rb
  773. 453:        defined?(::PluginBuilder) ? ::PluginBuilder : Rails::PluginBuilder
  774.  
  775. railties-7.0.3/lib/rails/ruby_version_check.rb
  776. 4:  desc = defined?(RUBY_DESCRIPTION) ? RUBY_DESCRIPTION : "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE})"
  777.  
  778. railties-7.0.3/lib/rails/tasks/engine.rake
  779. 20:  if !defined?(ENGINE_ROOT) || !ENGINE_ROOT
  780.  
  781. raindrops-0.20.0/lib/raindrops/middleware.rb
  782. 97:    if tmp.nil? && defined?(Unicorn) && Unicorn.respond_to?(:listener_names)
  783.  
  784. raindrops-0.20.0/test/test_raindrops_gc.rb
  785. 37:end if !defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby" &&
  786.  
  787. rake-13.0.6/lib/rake/backtrace.rb
  788. 14:      Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == "jruby"
  789.  
  790. rbs-2.7.0/lib/rbs/cli.rb
  791. 807:            stdout.puts "  #{defined?(Bundler) ? "bundle exec " : ""}rbs #{Shellwords.join(command)} --force #{Shellwords.escape(path.to_s)}"
  792.  
  793. redis-4.7.0/lib/redis/connection/ruby.rb
  794. 102:    if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
  795.  
  796. ref-2.0.0/lib/ref/weak_reference/weak_ref.rb
  797. 16:      if (defined?(RefError) && e.is_a?(RefError)) || (defined?(::WeakRef::RefError) && e.is_a?(::WeakRef::RefError))
  798.  
  799. ref-2.0.0/lib/ref.rb
  800. 20:    if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
  801.  
  802. request_store-1.5.1/lib/request_store/railtie.rb
  803. 10:      if ActiveSupport.const_defined?(:Reloader) && ActiveSupport::Reloader.respond_to?(:to_complete)
  804. 14:      elsif ActionDispatch.const_defined?(:Reloader) && ActionDispatch::Reloader.respond_to?(:to_cleanup)
  805.  
  806. resque-2.2.1/lib/resque/server/helpers.rb
  807. 14:      (defined?(Resque::Failure::RedisMultiQueue) && Resque::Failure.backend == Resque::Failure::RedisMultiQueue)
  808.  
  809. resque-2.2.1/lib/resque/server.rb
  810. 8:if defined?(Encoding) && Encoding.default_external != Encoding::UTF_8
  811.  
  812. rest-client-2.1.0/lib/restclient/request.rb
  813. 842:      URI.const_defined?(:Parser) ? URI::Parser.new : URI
  814.  
  815. rspec-core-3.11.0/lib/rspec/core/option_parser.rb
  816. 188:          if Object.const_defined?(:Warning) && Warning.respond_to?(:[]=)
  817.  
  818. rspec-mocks-3.11.1/lib/rspec/mocks/syntax.rb
  819. 187:        if defined?(JRUBY_VERSION) && JRUBY_VERSION == '1.7.4' && RUBY_VERSION.to_f > 1.8
  820.  
  821. rspec-rails-5.1.2/lib/rspec/rails/active_record.rb
  822. 10:          if defined?(ActiveRecord) && defined?(ActiveRecord::Base) && defined?(::RSpec::Mocks) && (::RSpec::Mocks.respond_to?(:configuration))
  823.  
  824. rspec-rails-5.1.2/lib/rspec/rails/example/controller_example_group.rb
  825. 65:          base_class ||= defined?(ApplicationController) ? ApplicationController : ActionController::Base
  826. 69:              root_controller = defined?(ApplicationController) ? ApplicationController : ActionController::Base
  827.  
  828. rspec-rails-5.1.2/lib/rspec/rails/feature_check.rb
  829. 27:        defined?(::ActionCable) && ActionCable::VERSION::MAJOR >= 6
  830.  
  831. rspec-rails-5.1.2/lib/rspec/rails/matchers/action_mailbox.rb
  832. 25:          if defined?(::ApplicationMailbox) && ::ApplicationMailbox.router.respond_to?(:mailbox_for)
  833.  
  834. rspec-rails-5.1.2/lib/rspec/rails/matchers/relation_match_array.rb
  835. 1:if defined?(ActiveRecord::Relation) && defined?(RSpec::Matchers::BuiltIn::OperatorMatcher) # RSpec 4 removed OperatorMatcher
  836.  
  837. rspec-rails-5.1.2/lib/rspec/rails/vendor/capybara.rb
  838. 15:      if defined?(ActionPack) && ActionPack::VERSION::STRING >= "5.1"
  839.  
  840. rspec-support-3.11.0/lib/rspec/support/object_formatter.rb
  841. 161:          defined?(DateTime) && DateTime === object
  842. 177:          defined?(BigDecimal) && BigDecimal === object
  843. 224:          defined?(Delegator) && Delegator === object
  844.  
  845. rspec-support-3.11.0/lib/rspec/support/ruby_features.rb
  846. 40:        defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
  847. 48:        !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby'
  848. 52:        defined?(RUBY_ENGINE) && RUBY_ENGINE == 'truffleruby'
  849.  
  850. rspec_junit_formatter-0.5.1/lib/rspec_junit_formatter/rspec3.rb
  851. 152:if defined?(RSpec::Core::Notifications::NullColorizer) && RSpec::Core::Notifications::NullColorizer.is_a?(Class) && !RSpec::Core::Notifications::NullColorizer.respond_to?(:wrap)
  852.  
  853. rubocop-1.31.1/lib/rubocop/lockfile.rb
  854. 31:      return unless defined?(Bundler) && Bundler.default_lockfile
  855.  
  856. ruby-prof-1.4.3/lib/ruby-prof/printers/call_tree_printer.rb
  857. 37:        when RubyProf.const_defined?(:ALLOCATIONS) && RubyProf::ALLOCATIONS
  858. 40:        when RubyProf.const_defined?(:MEMORY) && RubyProf::MEMORY
  859. 43:        when RubyProf.const_defined?(:GC_RUNS) && RubyProf::GC_RUNS
  860. 46:        when RubyProf.const_defined?(:GC_TIME) && RubyProf::GC_TIME
  861.  
  862. rubygems-update-3.3.17/bundler/lib/bundler/capistrano.rb
  863. 14:if defined?(Capistrano::Version) && Gem::Version.new(Capistrano::Version).release >= Gem::Version.new("3.0")
  864.  
  865. rubygems-update-3.3.17/bundler/lib/bundler/deployment.rb
  866. 11:      if defined?(Capistrano) && context.is_a?(Capistrano::Configuration)
  867.  
  868. rubygems-update-3.3.17/bundler/lib/bundler/deprecate.rb
  869. 12:  if defined?(Bundler::Deprecate) && !autoload?(:Deprecate)
  870.  
  871. rubygems-update-3.3.17/bundler/lib/bundler/friendly_errors.rb
  872. 48:      when *[defined?(Java::JavaLang::OutOfMemoryError) && Java::JavaLang::OutOfMemoryError].compact
  873.  
  874. rubygems-update-3.3.17/bundler/lib/bundler/vendor/fileutils/lib/fileutils.rb
  875. 1165:    case (defined?(::RbConfig) ? ::RbConfig::CONFIG['host_os'] : ::RUBY_PLATFORM)
  876.  
  877. rubygems-update-3.3.17/bundler/lib/bundler/vendor/tmpdir/lib/tmpdir.rb
  878. 16:  @systmpdir ||= defined?(Etc.systmpdir) ? Etc.systmpdir : '/tmp'
  879.  
  880. rubygems-update-3.3.17/lib/rubygems/optparse/lib/optparse.rb
  881. 1262:    (defined?(@version) && @version) || (defined?(::Version) && ::Version)
  882. 1269:    (defined?(@release) && @release) || (defined?(::Release) && ::Release) || (defined?(::RELEASE) && ::RELEASE)
  883.  
  884. rubygems-update-3.3.17/lib/rubygems/security.rb
  885. 439:  if defined?(OpenSSL::PKey::EC) && Gem::Version.new(String.new(RUBY_VERSION)) < Gem::Version.new("2.4.0")
  886.  
  887. rubygems-update-3.3.17/lib/rubygems/specification.rb
  888. 1697:    defined?(::Date) and Date === obj
  889.  
  890. rubygems-update-3.3.17/lib/rubygems.rb
  891. 866:    unless defined?(RUBY_PATCHLEVEL) && RUBY_PATCHLEVEL != -1
  892.  
  893. rubygems-update-3.3.17/test/rubygems/test_gem_resolver_vendor_set.rb
  894. 75:    error = Object.const_defined?(:KeyError) ? KeyError : IndexError
  895.  
  896. rubygems-update-3.3.17/test/rubygems/test_gem_stream_ui.rb
  897. 8:  mjit_enabled = defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
  898.  
  899. safe_yaml-1.0.5/lib/safe_yaml/load.rb
  900. 7:  YAML_ENGINE = defined?(YAML::ENGINE) ? YAML::ENGINE.yamler : (defined?(Psych) && YAML == Psych ? "psych" : "syck")
  901.  
  902. safe_yaml-1.0.5/spec/spec_helper.rb
  903. 12:ruby_version = defined?(JRUBY_VERSION) ? "JRuby #{JRUBY_VERSION} in #{RUBY_VERSION} mode" : "Ruby #{RUBY_VERSION}"
  904. 13:yaml_engine = defined?(YAML::ENGINE) ? YAML::ENGINE.yamler : "syck"
  905. 14:libyaml_version = yaml_engine == "psych" && Psych.const_defined?("LIBYAML_VERSION", false) ? Psych::LIBYAML_VERSION : "N/A"
  906.  
  907. sass-3.4.25/lib/sass/engine.rb
  908. 194:        next p unless p.is_a?(String) || (defined?(Pathname) && p.is_a?(Pathname))
  909.  
  910. sass-3.4.25/lib/sass/railtie.rb
  911. 2:if defined?(ActiveSupport) && Sass::Util.has?(:public_method, ActiveSupport, :on_load) &&
  912.  
  913. sass-3.4.25/lib/sass/util.rb
  914. 28:    RUBY_ENGINE = defined?(::RUBY_ENGINE) ? ::RUBY_ENGINE : "ruby"
  915. 1193:    URI_ESCAPE = URI.const_defined?("DEFAULT_PARSER") ? URI::DEFAULT_PARSER : URI
  916.  
  917. sass-3.4.25/vendor/listen/lib/listen/adapters/windows.rb
  918. 45:        defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ruby'
  919.  
  920. sassc-2.4.0/lib/sassc/util.rb
  921. 25:  RUBY_ENGINE = defined?(::RUBY_ENGINE) ? ::RUBY_ENGINE : "ruby"
  922.  
  923. selenium-webdriver-4.3.0/lib/selenium/webdriver/common/options.rb
  924. 113:        browser_options = defined?(self.class::KEY) ? {self.class::KEY => options} : options
  925.  
  926. selenium-webdriver-4.3.0/lib/selenium/webdriver/remote/bridge.rb
  927. 596:          @escaper ||= defined?(URI::Parser) ? URI::DEFAULT_PARSER : URI
  928.  
  929. sentry-raven-3.1.2/lib/raven/configuration.rb
  930. 423:      if defined? Rails.root # we are in a Rails application
  931.  
  932. sequel-5.57.0/lib/sequel/extensions/date_arithmetic.rb
  933. 53:        if defined?(ActiveSupport::Duration) && interval.is_a?(ActiveSupport::Duration)
  934.  
  935. sequel-5.57.0/lib/sequel/extensions/named_timezones.rb
  936. 95:      if defined?(TZInfo::VERSION) && TZInfo::VERSION > '2'
  937. 113:    if defined?(TZInfo::VERSION) && TZInfo::VERSION > '2'
  938.  
  939. sequel-5.57.0/lib/sequel/extensions/pg_extended_date_support.rb
  940. 89:            conv = defined?(JRUBY_VERSION) && JRUBY_VERSION == '9.2.0.0'
  941.  
  942. sequel-5.57.0/lib/sequel/extensions/pg_hstore_ops.rb
  943. 130:        if key.is_a?(Array) || (defined?(Sequel::Postgres::PGArray) && key.is_a?(Sequel::Postgres::PGArray)) || (defined?(Sequel::Postgres::ArrayOp) && key.is_a?(Sequel::Postgres::ArrayOp))
  944.  
  945. sequel-5.57.0/lib/sequel/extensions/pg_inet.rb
  946. 45:          if !defined?(SEQUEL_PG_VERSION_INTEGER) || SEQUEL_PG_VERSION_INTEGER >= 11300
  947.  
  948. sequel-5.57.0/lib/sequel/extensions/pg_interval.rb
  949. 73:        USE_PARTS_ARRAY = !defined?(ActiveSupport::VERSION::STRING) || ActiveSupport::VERSION::STRING < '5.1'
  950.  
  951. sequel-5.57.0/lib/sequel/extensions/pg_json_ops.rb
  952. 303:        a.is_a?(Array) || (defined?(PGArray) && a.is_a?(PGArray)) || (defined?(ArrayOp) && a.is_a?(ArrayOp))
  953.  
  954. sequel-5.57.0/lib/sequel/extensions/server_block.rb
  955. 72:      if defined?(ShardedThreadedConnectionPool) && pool.is_a?(ShardedThreadedConnectionPool)
  956.  
  957. sequel-5.57.0/lib/sequel/model.rb
  958. 73:    if !defined?(::SEQUEL_NO_ASSOCIATIONS) && !ENV.has_key?('SEQUEL_NO_ASSOCIATIONS')
  959.  
  960. sequel-5.57.0/lib/sequel/plugins/blacklist_security.rb
  961. 61:          if (!defined?(::Sequel::Plugins::WhitelistSecurity::ClassMethods) || !is_a?(::Sequel::Plugins::WhitelistSecurity::ClassMethods) || !allowed_columns) && restricted_columns
  962.  
  963. sequel-5.57.0/lib/sequel/plugins/throw_failures.rb
  964. 67:        if RUBY_VERSION >= '2.2' && (!defined?(JRUBY_VERSION) || JRUBY_VERSION > '9.1')
  965.  
  966. sidekiq-6.5.1/lib/sidekiq/cli.rb
  967. 423:      defined?(::Rails) && ::Rails.respond_to?(:application)
  968.  
  969. sidekiq-6.5.1/lib/sidekiq/testing.rb
  970. 341:if defined?(::Rails) && Rails.respond_to?(:env) && !Rails.env.test? && !$TESTING
  971.  
  972. simple_form-5.1.0/lib/simple_form.rb
  973. 175:  @@cache_discovery = defined?(Rails.env) && !Rails.env.development?
  974.  
  975. simplecov-0.21.2/lib/simplecov/process.rb
  976. 6:      if defined?(SimpleCov) && SimpleCov.running
  977.  
  978. simplecov-0.21.2/lib/simplecov.rb
  979. 270:      !defined?(ParallelTests) || !ENV["TEST_ENV_NUMBER"] || ParallelTests.last_process?
  980.  
  981. sinatra-2.2.0/lib/sinatra/base.rb
  982. 1843:    ruby_engine = defined?(RUBY_ENGINE) && RUBY_ENGINE
  983.  
  984. sinatra-2.2.0/lib/sinatra/show_exceptions.rb
  985. 64:      elsif (defined?(Gem) && frame.filename.include?(Gem.dir)) ||
  986.  
  987. slim-4.1.0/test/core/helper.rb
  988. 65:    if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
  989.  
  990. specinfra-2.83.2/lib/specinfra/configuration.rb
  991. 39:        if @os.nil? && defined?(RSpec) && RSpec.configuration.respond_to?(:os)
  992. 59:          if ret.nil? && defined?(RSpec) && RSpec.configuration.respond_to?(key)
  993.  
  994. specinfra-2.83.2/lib/specinfra/helper/configuration.rb
  995. 36:          next if c == :lxc && defined?(Serverspec::Type::Lxc) && value.is_a?(Serverspec::Type::Lxc)
  996.  
  997. spring-4.0.0/lib/spring/application.rb
  998. 121:      if defined?(Rails) && Rails.application
  999. 372:      defined?(ActiveRecord::Base) && ActiveRecord::Base.configurations.any?
  1000.  
  1001. temple-0.8.2/lib/temple/filters/string_splitter.rb
  1002. 10:      if defined?(Ripper) && RUBY_VERSION >= "2.0.0" && Ripper.respond_to?(:lex)
  1003.  
  1004. temple-0.8.2/lib/temple/static_analyzer.rb
  1005. 33:        defined?(Ripper) && Ripper.respond_to?(:lex)
  1006.  
  1007. temple-0.8.2/test/test_static_analyzer.rb
  1008. 6:      Temple::StaticAnalyzer.available?.should.equal(defined?(Ripper) && Ripper.respond_to?(:lex))
  1009.  
  1010. test-unit-3.5.3/lib/test/unit/warning.rb
  1011. 1:if defined?(Warning) and Warning.respond_to?(:[]=)
  1012.  
  1013. thread_safe-0.3.6/lib/thread_safe/util/atomic_reference.rb
  1014. 10:          defined?(Atomic::InternalReference) ? Atomic::InternalReference : Atomic
  1015.  
  1016. thread_safe-0.3.6/lib/thread_safe/util/cheap_lockable.rb
  1017. 24:      engine = defined?(RUBY_ENGINE) && RUBY_ENGINE
  1018.  
  1019. thread_safe-0.3.6/lib/thread_safe/util/volatile_tuple.rb
  1020. 13:      Tuple = defined?(Rubinius::Tuple) ? Rubinius::Tuple : Array
  1021.  
  1022. thread_safe-0.3.6/lib/thread_safe.rb
  1023. 31:  elsif !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby'
  1024. 36:  elsif defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
  1025.  
  1026. timecop-0.9.5/lib/timecop/time_stack_item.rb
  1027. 104:      elsif Object.const_defined?(:DateTime) && arg.is_a?(DateTime)
  1028. 106:      elsif Object.const_defined?(:Date) && arg.is_a?(Date)
  1029.  
  1030. tty-screen-0.8.1/lib/tty/screen.rb
  1031. 21:    case (defined?(::RbConfig) ? ::RbConfig::CONFIG["host_os"] : ::RUBY_PLATFORM)
  1032. 29:    case (defined?(::RbConfig) ? ::RbConfig::CONFIG["ruby_install_name"] : ::RUBY_ENGINE)
  1033.  
  1034. tzinfo-2.0.4/lib/tzinfo/data_sources/ruby_data_source.rb
  1035. 141:        "tzdb v#{TZInfo::Data::Version::TZDATA}#{TZInfo::Data.const_defined?(:VERSION) ? ", tzinfo-data v#{TZInfo::Data::VERSION}" : ''}"
  1036.  
  1037. unf-0.1.4/lib/unf/normalizer.rb
  1038. 2:if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
  1039.  
  1040. unicorn-6.1.0/lib/unicorn/http_server.rb
  1041. 817:      if defined?(Gem) && Gem.respond_to?(:refresh)
  1042.  
  1043. vcr-6.1.0/lib/vcr/middleware/excon.rb
  1044. 157:        if defined?(::Excon::Utils) && ::Excon::Utils.respond_to?(:request_uri)
  1045.  
  1046. webmock-3.14.0/minitest/test_helper.rb
  1047. 13:test_class = defined?(MiniTest::Test) ? MiniTest::Test : MiniTest::Unit::TestCase
  1048.  
  1049. webmock-3.14.0/minitest/test_webmock.rb
  1050. 4:test_class = defined?(MiniTest::Test) ? MiniTest::Test : MiniTest::Unit::TestCase
  1051.  
  1052. webmock-3.14.0/spec/acceptance/net_http/net_http_shared.rb
  1053. 36:      if !defined?(WebMock::Config) || WebMock::Config.instance.net_http_connect_on_start
  1054.  
  1055. whenever-1.0.0/lib/whenever/capistrano.rb
  1056. 3:if defined?(Capistrano::VERSION) && Gem::Version.new(Capistrano::VERSION).release >= Gem::Version.new('3.0.0')
  1057.  
  1058. will_paginate-3.3.1/lib/will_paginate/deprecation.rb
  1059. 13:      defined?(Rails.logger) && Rails.logger
  1060.  
  1061. will_paginate-3.3.1/lib/will_paginate.rb
  1062. 23:if defined?(Sinatra) and Sinatra.respond_to? :register
  1063.  
  1064. will_paginate-3.3.1/spec/finders/activerecord_test_connector.rb
  1065. 48:    dep = defined?(ActiveSupport::Dependencies) ? ActiveSupport::Dependencies : ::Dependencies
  1066.  
  1067. yard-0.9.28/lib/rubygems_plugin.rb
  1068. 2:if defined?(Gem::VERSION) && Gem::VERSION >= "2.0."
  1069.  
  1070. yard-0.9.28/lib/yard/cli/yardoc.rb
  1071. 226:        if defined?(::Encoding) && ::Encoding.respond_to?(:default_external=)
  1072. 703:            if defined?(Encoding) && Encoding.respond_to?(:default_external=)
  1073.  
  1074. yard-0.9.28/lib/yard/gem_index.rb
  1075. 10:      if defined?(Gem::Specification) && Gem::Specification.respond_to?(:find_all_by_name)
  1076. 18:      if defined?(Gem::Specification) && Gem::Specification.respond_to?(:each)
  1077.  
  1078. yard-0.9.28/lib/yard/rubygems/backports.rb
  1079. 4:  if defined?(Gem::VERSION) && Gem::VERSION >= '1.8.0'
  1080.  
  1081. yard-0.9.28/lib/yard/rubygems/specification.rb
  1082. 29:  if defined?(Gem::VERSION) && Gem::VERSION >= '1.7.'
  1083.  
  1084. yard-0.9.28/lib/yard/templates/helpers/markup/rdoc_markup.rb
  1085. 14:            if defined?(RDoc::VERSION) && RDoc::VERSION >= '4.0.0' &&
  1086.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement