trollop 1.10.1 → 1.10.2

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.
Files changed (3) hide show
  1. data/History.txt +4 -0
  2. data/lib/trollop.rb +12 -13
  3. metadata +2 -2
@@ -1,3 +1,7 @@
1
+ == 1.10.2 / 2008-10-23
2
+ * No longer try `stty size` for screen size detection. Just use curses, and
3
+ screen users will have to deal with the screen clearing.
4
+
1
5
  == 1.10.1 / 2008-10-22
2
6
  * Options hash now responds to method calls as well as standard hash lookup.
3
7
  * Default values for multi-occurrence parameters now autoboxed.
@@ -5,7 +5,7 @@
5
5
 
6
6
  module Trollop
7
7
 
8
- VERSION = "1.10.1"
8
+ VERSION = "1.10.2"
9
9
 
10
10
  ## Thrown by Parser in the event of a commandline error. Not needed if
11
11
  ## you're using the Trollop::options entry.
@@ -501,19 +501,18 @@ class Parser
501
501
  def width #:nodoc:
502
502
  @width ||=
503
503
  if $stdout.tty?
504
- if `stty size` =~ /^(\d+) (\d+)$/
505
- $2.to_i
506
- else
507
- begin
508
- require 'curses'
509
- Curses::init_screen
510
- x = Curses::cols
511
- Curses::close_screen
512
- x
513
- rescue Exception
514
- end
504
+ begin
505
+ require 'curses'
506
+ Curses::init_screen
507
+ x = Curses::cols
508
+ Curses::close_screen
509
+ x
510
+ rescue Exception
511
+ 80
515
512
  end
516
- end || 80
513
+ else
514
+ 80
515
+ end
517
516
  end
518
517
 
519
518
  ## Print the help message to +stream+.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trollop
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.1
4
+ version: 1.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Morgan
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-22 00:00:00 -07:00
12
+ date: 2008-10-23 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15