Skip to content

Instantly share code, notes, and snippets.

@jabley
Created October 15, 2009 21:18
Show Gist options
  • Save jabley/211293 to your computer and use it in GitHub Desktop.
Save jabley/211293 to your computer and use it in GitHub Desktop.
From 0adaa2a3b4968cd7d0bafd9df1c5f948ac7ea79f Mon Sep 17 00:00:00 2001
From: James Abley <[email protected]>
Date: Thu, 15 Oct 2009 21:58:56 +0100
Subject: [PATCH] Spec for non-ascii dynamic regexp with once modifier
See http://jira.codehaus.org/browse/JRUBY-4037
---
core/regexp/modifiers_spec.rb | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
create mode 100644 core/regexp/modifiers_spec.rb
diff --git a/core/regexp/modifiers_spec.rb b/core/regexp/modifiers_spec.rb
new file mode 100644
index 0000000..aab50ac
--- /dev/null
+++ b/core/regexp/modifiers_spec.rb
@@ -0,0 +1,8 @@
+# -*- coding: utf-8 -*-
+require File.dirname(__FILE__) + '/../../spec_helper'
+
+describe "Regexp#modifiers" do
+ it "returns the same inspect value for dynamic regexp whether once is used or not" do
+ "ä"[/#{/\w/}/uo].inspect.should == "ä"[/#{/\w/}/u].inspect
+ end
+end
--
1.6.0.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment