rb-inotify 0.9.1 → 0.9.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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.1
1
+ 0.9.2
@@ -13,5 +13,5 @@ module INotify
13
13
  # An array containing the version number of rb-inotify.
14
14
  # The numbers in the array are the major, minor, and patch versions,
15
15
  # respectively.
16
- VERSION = [0, 9, 1]
16
+ VERSION = [0, 9, 2]
17
17
  end
@@ -113,7 +113,7 @@ module INotify
113
113
  @native = Native::Event.new(ptr)
114
114
  @related = []
115
115
  @cookie = @native[:cookie]
116
- @name = data[@native.size, @native[:len]].gsub(/\0+$/, '')
116
+ @name = fix_encoding(data[@native.size, @native[:len]].gsub(/\0+$/, ''))
117
117
  @notifier = notifier
118
118
  @watcher_id = @native[:wd]
119
119
 
@@ -135,5 +135,12 @@ module INotify
135
135
  def size
136
136
  @native.size + @native[:len]
137
137
  end
138
+
139
+ private
140
+
141
+ def fix_encoding(name)
142
+ name.force_encoding('filesystem') if name.respond_to?(:force_encoding)
143
+ name
144
+ end
138
145
  end
139
146
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "rb-inotify"
8
- s.version = "0.9.1"
8
+ s.version = "0.9.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Nathan Weizenbaum"]
12
- s.date = "2013-08-09"
12
+ s.date = "2013-09-12"
13
13
  s.description = "A Ruby wrapper for Linux's inotify, using FFI"
14
14
  s.email = "nex342@gmail.com"
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rb-inotify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.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-08-09 00:00:00.000000000 Z
12
+ date: 2013-09-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi