glark 1.10.1 → 1.10.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,7 @@ require 'glark/util/options'
7
7
 
8
8
  module Glark
9
9
  PACKAGE = 'glark'
10
- VERSION = '1.10.1'
10
+ VERSION = '1.10.2'
11
11
 
12
12
  class InfoOptions < Options
13
13
  attr_reader :colors
@@ -119,7 +119,7 @@ module Glark
119
119
  end
120
120
 
121
121
  if name == "-"
122
- write "reading standard input..."
122
+ info "reading standard input..."
123
123
  search_text nil, $stdin
124
124
  else
125
125
  case type
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/ruby -w
2
2
  #!ruby -w
3
3
  # vim: set filetype=ruby : set sw=2
4
+ # -*- encoding: UTF-8 -*-
4
5
 
5
6
  require 'glark/match/expression'
6
7
  require 'glark/util/highlight'
@@ -35,6 +36,9 @@ class RegexpExpression < Expression
35
36
  end
36
37
 
37
38
  def match? line
39
+ if String.method_defined?(:encode)
40
+ line.encode! 'UTF-8', 'UTF-8', :invalid => :replace
41
+ end
38
42
  @re.match line
39
43
  end
40
44
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glark
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.1
4
+ version: 1.10.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-28 00:00:00.000000000 Z
12
+ date: 2013-03-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: riel