fancy_irb 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/fancy_irb.gemspec +1 -1
  3. data/lib/fancy_irb.rb +4 -1
  4. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.1
1
+ 0.6.2
data/fancy_irb.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{fancy_irb}
8
- s.version = "0.6.1"
8
+ s.version = "0.6.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jan Lelis"]
data/lib/fancy_irb.rb CHANGED
@@ -105,7 +105,10 @@ class << FancyIrb
105
105
 
106
106
  def track_height(data)
107
107
  lines = data.to_s.count("\n")
108
- long_lines = data.to_s.split("\n").inject(0){ |sum, line| line.size / `tput cols`.to_i }
108
+ long_lines = data.to_s.split("\n").inject(0){ |sum, line|
109
+ line_size = (RUBY_VERSION[2] == ?8) ? line.unpack('U*').size : line.size
110
+ sum + (line_size / `tput cols`.to_i)
111
+ }
109
112
  @height_counter << lines + long_lines
110
113
  end
111
114
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fancy_irb
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 1
10
- version: 0.6.1
9
+ - 2
10
+ version: 0.6.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jan Lelis