Don't crash on p.toUri('') (#114)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 264eb6a..f6d69ba 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,6 @@
-## 1.8.1-dev
+## 1.8.1
+
+* Don't crash when an empty string is passed to `toUri()`.
 
 ## 1.8.0
 
diff --git a/lib/src/internal_style.dart b/lib/src/internal_style.dart
index 3041143..71762c1 100644
--- a/lib/src/internal_style.dart
+++ b/lib/src/internal_style.dart
@@ -61,6 +61,7 @@
   /// Returns the URI that represents a relative path.
   @override
   Uri relativePathToUri(String path) {
+    if (path.isEmpty) return Uri();
     final segments = context.split(path);
 
     // Ensure that a trailing slash in the path produces a trailing slash in the
diff --git a/pubspec.yaml b/pubspec.yaml
index 310675d..1bd006e 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
 name: path
-version: 1.8.1-dev
+version: 1.8.1
 
 description: >-
   A string-based path manipulation library. All of the path operations you know
diff --git a/test/posix_test.dart b/test/posix_test.dart
index 53b18f2..cc64a54 100644
--- a/test/posix_test.dart
+++ b/test/posix_test.dart
@@ -590,6 +590,7 @@
         Uri.parse('file:///_%7B_%7D_%60_%5E_%20_%22_%25_'));
     expect(context.toUri(r'_{_}_`_^_ _"_%_'),
         Uri.parse('_%7B_%7D_%60_%5E_%20_%22_%25_'));
+    expect(context.toUri(''), Uri.parse(''));
   });
 
   group('prettyUri', () {
diff --git a/test/url_test.dart b/test/url_test.dart
index 16eca4c..e0b5903 100644
--- a/test/url_test.dart
+++ b/test/url_test.dart
@@ -871,6 +871,7 @@
         Uri.parse('http://foo.com/_%7B_%7D_%60_%5E_%20_%22_%25_'));
     expect(context.toUri(r'_%7B_%7D_%60_%5E_%20_%22_%25_'),
         Uri.parse('_%7B_%7D_%60_%5E_%20_%22_%25_'));
+    expect(context.toUri(''), Uri.parse(''));
   });
 
   group('prettyUri', () {
diff --git a/test/windows_test.dart b/test/windows_test.dart
index e59b207..be9a790 100644
--- a/test/windows_test.dart
+++ b/test/windows_test.dart
@@ -759,6 +759,7 @@
         Uri.parse('file:///C:/_%7B_%7D_%60_%5E_%20_%22_%25_'));
     expect(context.toUri(r'_{_}_`_^_ _"_%_'),
         Uri.parse('_%7B_%7D_%60_%5E_%20_%22_%25_'));
+    expect(context.toUri(''), Uri.parse(''));
   });
 
   group('prettyUri', () {