magic-help 0.20170204 → 0.20201211

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 59db211c23ba22dab20b3e5b3e16e3303dcfe1dd
4
- data.tar.gz: b50b3dae0566f1807bd297df5d3113c0830f7ef6
2
+ SHA256:
3
+ metadata.gz: 175b0721b071db7a6f6db4519dcb0c8fc3bd2c40956790f89406abf762e833be
4
+ data.tar.gz: aed2a5e144bdd82970c27066141872f7a90f72bad94f6201c310b820a6b9cdbe
5
5
  SHA512:
6
- metadata.gz: 5523804800dc7e7733e12e775900ce47fb7a568608a27abc3c78ae43157f6f285cb2f1133e0d302360e20da31a21a946b4861328f1047603c0d244679ce2e602
7
- data.tar.gz: 101f7ccdfd34ddc90287b470f295c16dcbb2de5fc1041fa6bf861576e5e60d1306a0951f2bc57201455a14e4c38383d8b4cc18ef9b2310a2cba38e2356a75400
6
+ metadata.gz: e94d26c896d9926db4ef41de511025209734ca585da05f60e00c98885caa6a5f7fd0a300f341de7068e7271ad35293e344db683f74aea63d96e9abf65174c6db
7
+ data.tar.gz: 9af220adee30209d478bdd7a5f78899d00b030bc3c80cdda5670267e2db2c26784a014b51024f2271e37f149ac98b611f8663dfb0e6e0e26741df1b5c7003805
@@ -7,7 +7,11 @@ module Magic
7
7
  unless m.inspect =~ %r[\A#<(?:Unbound)?Method: (.*?)>\Z]
8
8
  raise "Cannot parse result of #{m.class}#inspect: #{m.inspect}"
9
9
  end
10
- $1.sub(/\A.*?\((.*?)\)(.*)\Z/){ "#{$1}#{$2}" }.sub(/\./, "::").sub(/#<Class:(.*?)>#/) { "#{$1}::" }
10
+ $1
11
+ .sub(/\(\*?\)\z/, "")
12
+ .sub(/\A.*?\((.*?)\)(.*)\Z/){ "#{$1}#{$2}" }
13
+ .sub(/\./, "::")
14
+ .sub(/#<Class:(.*?)>#/) { "#{$1}::" }
11
15
  end
12
16
 
13
17
  # Magic::Help.postprocess is used to postprocess queries in two cases:
@@ -104,7 +104,11 @@ class Test_Magic_Help < Minitest::Test
104
104
 
105
105
  def test_operators
106
106
  # Ruby apparently optimizes away 2+2, that's awkward...
107
- assert_irb_help("Fixnum#**"){ 2 ** 2 }
107
+ if RUBY_VERSION < "2.4"
108
+ assert_irb_help("Fixnum#**"){ 2 ** 2 } # 2.3
109
+ else
110
+ assert_irb_help("Integer#**"){ 2 ** 2 } # 2.3
111
+ end
108
112
  assert_irb_help("Float#**"){ 2.0 ** 2.0 }
109
113
  assert_irb_help("Array#[]"){ [][] }
110
114
  # =~ is instance method of Kernel, but is documented as instance method of Object
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magic-help
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.20170204'
4
+ version: '0.20201211'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomasz Wegrzanowski
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-04 00:00:00.000000000 Z
11
+ date: 2020-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -38,7 +38,7 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- description:
41
+ description:
42
42
  email: Tomasz.Wegrzanowski@gmail.com
43
43
  executables: []
44
44
  extensions: []
@@ -54,7 +54,7 @@ files:
54
54
  homepage: https://github.com/taw/magic-help
55
55
  licenses: []
56
56
  metadata: {}
57
- post_install_message:
57
+ post_install_message:
58
58
  rdoc_options: []
59
59
  require_paths:
60
60
  - lib
@@ -69,11 +69,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubyforge_project:
73
- rubygems_version: 2.5.2
74
- signing_key:
72
+ rubygems_version: 3.1.2
73
+ signing_key:
75
74
  specification_version: 4
76
75
  summary: Plugin for irb providing more intuitive documentation access.
77
76
  test_files:
78
- - test/mass_test.rb
79
77
  - test/tc_magic_help.rb
78
+ - test/mass_test.rb