y_support 2.0.18 → 2.0.19
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 +4 -4
- data/lib/y_support/core_ext/array/misc.rb +1 -1
- data/lib/y_support/version.rb +1 -1
- data/lib/y_support/x.rb +7 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 830c2250049f13a6556ee845c9df177a028c1fe1
|
4
|
+
data.tar.gz: 21967540a9ab9d1404f6dc082b81ad5ce17e655a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eedc8bbb2c27b4aa09236f65e325709f6a4b14d3c4cc528314632140f85cd17d92b29b389847dbc969694c0eefc52d1494d939b1c176b0b07a9230136854e8fb
|
7
|
+
data.tar.gz: 6d04e578d1157188194b7183e58039f4351e6252b9de4bcce3b50a6b1a162024d056469ca20c9d75323d467c6417129cd4269f744d20431d89f71e9b10a08883
|
@@ -20,7 +20,7 @@ class Array
|
|
20
20
|
if block_given? then
|
21
21
|
fail ArgumentError, "Argument not allowed if block given!" unless
|
22
22
|
collection.nil?
|
23
|
-
Hash[ zip(
|
23
|
+
Hash[ zip( map { |e| yield e } ) ]
|
24
24
|
else
|
25
25
|
fail ArgumentError "A second collection expected as an argument!" unless
|
26
26
|
collection.respond_to? :each
|
data/lib/y_support/version.rb
CHANGED
data/lib/y_support/x.rb
CHANGED
@@ -37,17 +37,20 @@ module YSupport::X
|
|
37
37
|
vbox.pack_start_defaults( tlabel_widget )
|
38
38
|
vbox.pack_start_defaults( hbox )
|
39
39
|
w.add(vbox)
|
40
|
-
|
40
|
+
|
41
|
+
memo = ""
|
42
|
+
memo_closure = -> txt { memo << txt }
|
43
|
+
|
41
44
|
ebox_widget.signal_connect("key-release-event") do |sender, event| # cc
|
42
45
|
kn = Gdk::Keyval.to_name(k = event.keyval)
|
43
46
|
if kn == "Return"
|
47
|
+
memo_closure.( sender.text )
|
44
48
|
block.( sender.text )
|
45
49
|
Gtk.main_quit
|
46
50
|
end
|
47
51
|
end
|
48
52
|
|
49
|
-
w.show_all
|
50
|
-
Gtk.main
|
53
|
+
memo.tap { w.show_all; Gtk.main }
|
51
54
|
end
|
52
55
|
|
53
56
|
# Message box.
|
@@ -60,5 +63,6 @@ module YSupport::X
|
|
60
63
|
w.set_default_size( 600, 120 ).show_all
|
61
64
|
Gtk.main
|
62
65
|
end
|
66
|
+
alias popup message_box
|
63
67
|
end
|
64
68
|
end # module YSupport::X
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: y_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- boris
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|