I noted that a test involves an myKlass with no methods.
My solution of isObject will not pass that test.
In isObjectLiteral gist there is no such test case, so I supposed that
that case is negligible for reason:
normally an class have methods, and detecting empty prototypes would
complicate isObject a lot (http://gist.github.com/158651).

So, I will suppose that unit test is wrong, for now, and I added an
another patch to http://dev.jquery.com/ticket/5474 that corrects it.

On Nov 8, 11:31 pm, John Resig <jere...@gmail.com> wrote:
> Thanks!
>
>
>
> On Sunday, November 8, 2009, Robert Katić <robert.ka...@gmail.com> wrote:
> >http://dev.jquery.com/ticket/5474
>
> > On Nov 8, 2:13 pm, John Resig <jere...@gmail.com> wrote:
> >> > constructor property is often changed.
> >> > I hope you want isObject(jQuery()) == false.
>
> >> Yep, and that'll work as we expect it to. The one case where it won't
> >> is if you do obj.constructor = Object;
>
> >> If anyone thinks of an alternative solution please feel free to modify
> >> the gist and put your code up there - something that covers all the
> >> test cases would be great.
>
> >> --John
>
> > --
>
> > You received this message because you are subscribed to the Google Groups 
> > "jQuery Development" group.
> > To post to this group, send email to jquery-...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > jquery-dev+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/jquery-dev?hl=en.
>
> --
> --John

--

You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en.


Reply via email to