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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ee5951ea1425d5aea67be99fe932b1c0cfdba9c
4
- data.tar.gz: 39e951f5f04568856504cd32f621d82690282aab
3
+ metadata.gz: 830c2250049f13a6556ee845c9df177a028c1fe1
4
+ data.tar.gz: 21967540a9ab9d1404f6dc082b81ad5ce17e655a
5
5
  SHA512:
6
- metadata.gz: 8ee78b2a4107db323c83d89681b91a70dc2fe0e787de831404c8944181e12dc45b0cfcc44c148f728bc2dad317c6443d2cf50ee5f53a7c85977f50405fe36978
7
- data.tar.gz: 45d4a42769e648d2eeeedc60d33121fc560069fbe4d481ac3d33c353979833e19a8a9ebd1f5f4c029b7ad4b7291dd9682a2cff3030ac1168b5feab1f1d25eb3d
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( collection.map { |e| yield e } ) ]
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
@@ -1,3 +1,3 @@
1
1
  module YSupport
2
- VERSION = "2.0.18"
2
+ VERSION = "2.0.19"
3
3
  end
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 # cc
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.18
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-03 00:00:00.000000000 Z
11
+ date: 2013-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport