katakata_irb 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/katakata_irb/completor.rb +13 -13
- data/lib/katakata_irb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de309515e451688552ff4758e266ba13966dfef8e62601d0496e3dfc1df256c1
|
4
|
+
data.tar.gz: 9923f034c376e28156f7d4a8552f893a2d70546372f7feea0f0f04e5072d782a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 956de3a2a11d2ab1d877dbc832010fe501c18d1708dc9371e3d7dec9b0a158c66a6a05456660336e72b321662cae4ef764f2f0e065c4f7eab2f542262f59fe43
|
7
|
+
data.tar.gz: 2cc3a0e8829e6567fa34dd9a3218db03a8b51f5733392680b759810395aaab62ed2ca18c2fbc52f67c2608d6c0e6107c22e4546dcfc0c3aa8f055450ee8287f0
|
@@ -20,10 +20,10 @@ module KatakataIrb::Completor
|
|
20
20
|
KatakataIrb::Completor.prev_analyze_result = result
|
21
21
|
candidates = case result
|
22
22
|
in [:require | :require_relative => method, name]
|
23
|
-
if IRB.const_defined? :
|
24
|
-
path_completor = IRB::InputCompletor
|
25
|
-
elsif IRB.const_defined? :RegexpCompletor # IRB::VERSION >= 1.8.2
|
23
|
+
if IRB.const_defined? :RegexpCompletor # IRB::VERSION >= 1.8.2
|
26
24
|
path_completor = IRB::RegexpCompletor.new
|
25
|
+
elsif IRB.const_defined? :InputCompletor # IRB::VERSION <= 1.8.1
|
26
|
+
path_completor = IRB::InputCompletor
|
27
27
|
end
|
28
28
|
if !path_completor
|
29
29
|
[]
|
@@ -103,7 +103,16 @@ module KatakataIrb::Completor
|
|
103
103
|
end
|
104
104
|
end
|
105
105
|
|
106
|
-
if IRB.const_defined? :
|
106
|
+
if IRB.const_defined? :RegexpCompletor # IRB::VERSION >= 1.8.2
|
107
|
+
IRB::RegexpCompletor.class_eval do
|
108
|
+
define_method :completion_candidates do |preposing, target, postposing, bind:|
|
109
|
+
completion_proc.call(target, preposing, postposing)
|
110
|
+
end
|
111
|
+
define_method :doc_namespace do |_preposing, matched, _postposing, bind:|
|
112
|
+
doc_namespace_proc.call matched
|
113
|
+
end
|
114
|
+
end
|
115
|
+
elsif IRB.const_defined? :InputCompletor # IRB::VERSION <= 1.8.1
|
107
116
|
IRB::InputCompletor::CompletionProc.define_singleton_method :call do |*args|
|
108
117
|
completion_proc.call(*args)
|
109
118
|
end
|
@@ -115,15 +124,6 @@ module KatakataIrb::Completor
|
|
115
124
|
end
|
116
125
|
end
|
117
126
|
)
|
118
|
-
elsif IRB.const_defined? :RegexpCompletor # IRB::VERSION >= 1.8.2
|
119
|
-
IRB::RegexpCompletor.class_eval do
|
120
|
-
define_method :completion_candidates do |preposing, target, postposing, bind:|
|
121
|
-
completion_proc.call(target, preposing, postposing)
|
122
|
-
end
|
123
|
-
define_method :doc_namespace do |_preposing, matched, _postposing, bind:|
|
124
|
-
doc_namespace_proc.call matched
|
125
|
-
end
|
126
|
-
end
|
127
127
|
else
|
128
128
|
puts 'Cannot activate katakata_irb'
|
129
129
|
end
|
data/lib/katakata_irb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: katakata_irb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tompng
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: irb
|