projects
/
org.ibex.core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2003/11/05 06:22:10
[org.ibex.core.git]
/
src
/
org
/
xwt
/
js
/
Regexp.java
diff --git
a/src/org/xwt/js/Regexp.java
b/src/org/xwt/js/Regexp.java
index
8179123
..
834a425
100644
(file)
--- a/
src/org/xwt/js/Regexp.java
+++ b/
src/org/xwt/js/Regexp.java
@@
-7,9
+7,7
@@
public class Regexp extends JS.Obj {
private RE re;
private int lastIndex;
private RE re;
private int lastIndex;
- public Regexp(JS.Array args) throws JS.Exn {
- if(args.length() < 1) throw new JS.Exn("Not enough args to regexp");
- Object arg0 = args.elementAt(0);
+ public Regexp(Object arg0, Object arg1) throws JS.Exn {
if(arg0 instanceof Regexp) {
Regexp r = (Regexp) arg0;
this.global = r.global;
if(arg0 instanceof Regexp) {
Regexp r = (Regexp) arg0;
this.global = r.global;
@@
-19,7
+17,7
@@
public class Regexp extends JS.Obj {
String pattern = arg0.toString();
String sFlags = null;
int flags = 0;
String pattern = arg0.toString();
String sFlags = null;
int flags = 0;
- if(args.length() == 2) sFlags = args.elementAt(1).toString();
+ if(arg1 != null) sFlags = (String)arg1;
if(sFlags == null) sFlags = "";
for(int i=0;i<sFlags.length();i++) {
switch(sFlags.charAt(i)) {
if(sFlags == null) sFlags = "";
for(int i=0;i<sFlags.length();i++) {
switch(sFlags.charAt(i)) {